From 751bf256a0b644e679b899ce23bbf919f16dba75 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 23 Jan 2024 10:29:17 +0000 Subject: [PATCH 1/7] Update generated files with build 132033 --- .../secrets/secrets_put_request_body.py | 56 ++++ .../secrets/secrets_put_response.py | 56 ++++ .../secrets/secrets_request_builder.py | 13 +- ...onversation_member_item_request_builder.py | 8 +- .../item/replies/replies_request_builder.py | 6 +- .../invite/invite_request_builder.py | 6 +- .../device_app_management_request_builder.py | 4 +- ...managed_app_policy_item_request_builder.py | 8 +- .../target_apps_request_builder.py | 2 +- .../managed_app_policies_request_builder.py | 8 +- .../target_apps_request_builder.py | 2 +- .../target_apps_request_builder.py | 2 +- ...d_app_registration_item_request_builder.py | 8 +- ...naged_app_registrations_request_builder.py | 8 +- ...managed_app_status_item_request_builder.py | 8 +- .../assignments_request_builder.py | 14 +- ..._e_book_assignment_item_request_builder.py | 12 +- ..._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 | 6 +- ..._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 | 14 +- .../device_management_request_builder.py | 4 +- .../role_definition_item_request_builder.py | 8 +- .../role_definitions_request_builder.py | 6 +- .../item/drive_item_item_request_builder.py | 6 +- .../names/item/range/range_request_builder.py | 6 +- .../item/columns/columns_request_builder.py | 2 +- .../data_body_range_request_builder.py | 87 ++++++ .../filter/filter_request_builder.py | 215 +++++++++++++++ .../header_row_range_request_builder.py | 87 ++++++ .../item_at_with_index_request_builder.py | 50 ++++ .../range/range_request_builder.py | 87 ++++++ .../total_row_range_request_builder.py | 87 ++++++ .../item_at_with_index_request_builder.py | 10 + .../range/range_request_builder.py | 86 ++++++ .../tables/item/rows/rows_request_builder.py | 2 +- .../clear_filters_request_builder.py | 84 ++++++ .../columns/columns_request_builder.py | 203 ++++++++++++++ .../convert_to_range_request_builder.py | 87 ++++++ .../data_body_range_request_builder.py | 87 ++++++ .../header_row_range_request_builder.py | 87 ++++++ .../item_at_with_index_request_builder.py | 110 ++++++++ .../range/range_request_builder.py | 87 ++++++ .../reapply_filters_request_builder.py | 84 ++++++ .../rows/rows_request_builder.py | 203 ++++++++++++++ .../sort/sort_request_builder.py | 216 +++++++++++++++ .../total_row_range_request_builder.py | 87 ++++++ .../worksheet/worksheet_request_builder.py | 116 ++++++++ .../item/charts/charts_request_builder.py | 2 +- .../format/format_request_builder.py | 215 +++++++++++++++ .../item_at_with_index_request_builder.py | 10 + .../item/points/points_request_builder.py | 8 +- .../format/format_request_builder.py | 215 +++++++++++++++ .../item_at_with_index_request_builder.py | 20 ++ .../points/points_request_builder.py | 203 ++++++++++++++ .../item/series/series_request_builder.py | 2 +- .../axes/axes_request_builder.py | 215 +++++++++++++++ .../data_labels_request_builder.py | 217 +++++++++++++++ .../format/format_request_builder.py | 215 +++++++++++++++ .../image/image_get_response.py | 49 ++++ .../image/image_request_builder.py | 86 ++++++ .../image_with_width_get_response.py | 49 ++++ .../image_with_width_request_builder.py | 89 +++++++ ...age_with_width_with_height_get_response.py | 49 ++++ ..._with_width_with_height_request_builder.py | 91 +++++++ ...h_height_with_fitting_mode_get_response.py | 49 ++++ ...eight_with_fitting_mode_request_builder.py | 93 +++++++ .../item_at_with_index_request_builder.py | 148 +++++++++++ .../legend/legend_request_builder.py | 217 +++++++++++++++ .../series/series_request_builder.py | 203 ++++++++++++++ .../set_data/set_data_post_request_body.py | 60 +++++ .../set_data/set_data_request_builder.py | 92 +++++++ .../set_position_post_request_body.py | 60 +++++ .../set_position_request_builder.py | 92 +++++++ .../title/title_request_builder.py | 217 +++++++++++++++ .../worksheet/worksheet_request_builder.py | 116 ++++++++ .../axes/axes_request_builder.py | 215 +++++++++++++++ .../data_labels_request_builder.py | 217 +++++++++++++++ .../format/format_request_builder.py | 215 +++++++++++++++ .../image/image_get_response.py | 49 ++++ .../image/image_request_builder.py | 86 ++++++ .../image_with_width_get_response.py | 49 ++++ .../image_with_width_request_builder.py | 89 +++++++ ...age_with_width_with_height_get_response.py | 49 ++++ ..._with_width_with_height_request_builder.py | 91 +++++++ ...h_height_with_fitting_mode_get_response.py | 49 ++++ ...eight_with_fitting_mode_request_builder.py | 93 +++++++ .../item_with_name_request_builder.py | 148 +++++++++++ .../legend/legend_request_builder.py | 217 +++++++++++++++ .../series/series_request_builder.py | 203 ++++++++++++++ .../set_data/set_data_post_request_body.py | 60 +++++ .../set_data/set_data_request_builder.py | 92 +++++++ .../set_position_post_request_body.py | 60 +++++ .../set_position_request_builder.py | 92 +++++++ .../title/title_request_builder.py | 217 +++++++++++++++ .../worksheet/worksheet_request_builder.py | 116 ++++++++ .../names/item/range/range_request_builder.py | 6 +- .../item/columns/columns_request_builder.py | 2 +- .../data_body_range_request_builder.py | 87 ++++++ .../filter/filter_request_builder.py | 215 +++++++++++++++ .../header_row_range_request_builder.py | 87 ++++++ .../item_at_with_index_request_builder.py | 50 ++++ .../range/range_request_builder.py | 87 ++++++ .../total_row_range_request_builder.py | 87 ++++++ .../item_at_with_index_request_builder.py | 10 + .../range/range_request_builder.py | 86 ++++++ .../tables/item/rows/rows_request_builder.py | 2 +- .../clear_filters_request_builder.py | 84 ++++++ .../columns/columns_request_builder.py | 203 ++++++++++++++ .../convert_to_range_request_builder.py | 87 ++++++ .../data_body_range_request_builder.py | 87 ++++++ .../header_row_range_request_builder.py | 87 ++++++ .../item_at_with_index_request_builder.py | 110 ++++++++ .../range/range_request_builder.py | 87 ++++++ .../reapply_filters_request_builder.py | 84 ++++++ .../rows/rows_request_builder.py | 203 ++++++++++++++ .../sort/sort_request_builder.py | 216 +++++++++++++++ .../total_row_range_request_builder.py | 87 ++++++ .../worksheet/worksheet_request_builder.py | 116 ++++++++ .../worksheets/worksheets_request_builder.py | 2 +- .../employee_experience_request_builder.py | 13 + ...ernalcourse_activity_id_request_builder.py | 219 +++++++++++++++ ...ntents_with_external_id_request_builder.py | 220 ++++++++++++++++ ...ernalcourse_activity_id_request_builder.py | 220 ++++++++++++++++ .../learning_provider_item_request_builder.py | 26 ++ .../item/conversation_item_request_builder.py | 2 +- .../reply/reply_request_builder.py | 6 +- .../posts/item/reply/reply_request_builder.py | 6 +- .../item/reply/reply_request_builder.py | 6 +- .../groups/item/group_item_request_builder.py | 6 +- .../analytics/analytics_request_builder.py | 215 +++++++++++++++ .../columns/columns_request_builder.py | 203 ++++++++++++++ .../content_types_request_builder.py | 203 ++++++++++++++ .../created_by_user_request_builder.py | 116 ++++++++ .../drive/drive_request_builder.py | 116 ++++++++ .../drives/drives_request_builder.py | 146 ++++++++++ .../external_columns_request_builder.py | 146 ++++++++++ ...get_activities_by_interval_get_response.py | 57 ++++ ..._activities_by_interval_request_builder.py | 141 ++++++++++ ...nd_date_time_with_interval_get_response.py | 57 ++++ ...date_time_with_interval_request_builder.py | 148 +++++++++++ ...ypes_for_list_with_list_id_get_response.py | 57 ++++ ...s_for_list_with_list_id_request_builder.py | 144 ++++++++++ .../analytics/analytics_request_builder.py | 215 +++++++++++++++ .../columns/columns_request_builder.py | 203 ++++++++++++++ .../content_types_request_builder.py | 203 ++++++++++++++ .../created_by_user_request_builder.py | 116 ++++++++ .../drive/drive_request_builder.py | 116 ++++++++ .../drives/drives_request_builder.py | 146 ++++++++++ .../external_columns_request_builder.py | 146 ++++++++++ .../get_by_path_with_path1_request_builder.py | 249 ++++++++++++++++++ .../items/items_request_builder.py | 146 ++++++++++ .../last_modified_by_user_request_builder.py | 116 ++++++++ .../lists/lists_request_builder.py | 203 ++++++++++++++ .../onenote/onenote_request_builder.py | 215 +++++++++++++++ .../operations/operations_request_builder.py | 202 ++++++++++++++ .../permissions_request_builder.py | 203 ++++++++++++++ .../sites/sites_request_builder.py | 147 +++++++++++ .../term_store/term_store_request_builder.py | 217 +++++++++++++++ .../term_stores_request_builder.py | 201 ++++++++++++++ .../get_by_path_with_path_request_builder.py | 215 +++++++++++++++ .../items/items_request_builder.py | 146 ++++++++++ .../last_modified_by_user_request_builder.py | 116 ++++++++ .../lists/lists_request_builder.py | 203 ++++++++++++++ .../onenote/onenote_request_builder.py | 215 +++++++++++++++ .../operations/operations_request_builder.py | 202 ++++++++++++++ .../permissions_request_builder.py | 203 ++++++++++++++ .../sites/sites_request_builder.py | 147 +++++++++++ .../term_store/term_store_request_builder.py | 217 +++++++++++++++ .../term_stores_request_builder.py | 201 ++++++++++++++ .../lists/item/list_item_request_builder.py | 8 +- ...onversation_member_item_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 6 +- ...onversation_member_item_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 6 +- .../messages/messages_request_builder.py | 6 +- .../schedule/share/share_request_builder.py | 4 +- ...onversation_thread_item_request_builder.py | 10 +- .../reply/reply_request_builder.py | 6 +- .../posts/item/reply/reply_request_builder.py | 6 +- .../item/reply/reply_request_builder.py | 6 +- .../named_location_item_request_builder.py | 6 +- .../access_package_item_request_builder.py | 8 +- ..._callout_extension_item_request_builder.py | 14 +- ..._callout_extension_item_request_builder.py | 14 +- .../item/agreement_item_request_builder.py | 8 +- .../item/history/history_request_builder.py | 8 +- msgraph/generated/kiota-lock.json | 2 +- .../models/access_package_resource.py | 2 +- .../access_package_resource_attribute.py | 6 +- .../generated/models/education_submission.py | 3 + msgraph/generated/models/object_identity.py | 2 +- msgraph/generated/models/shift.py | 4 +- msgraph/generated/models/time_off.py | 4 +- msgraph/generated/models/user.py | 2 +- .../organization_request_builder.py | 8 +- .../secrets/secrets_put_request_body.py | 56 ++++ .../secrets/secrets_put_response.py | 56 ++++ .../secrets/secrets_request_builder.py | 13 +- .../analytics/analytics_request_builder.py | 215 +++++++++++++++ .../columns/columns_request_builder.py | 203 ++++++++++++++ .../content_types_request_builder.py | 203 ++++++++++++++ .../created_by_user_request_builder.py | 116 ++++++++ .../drive/drive_request_builder.py | 116 ++++++++ .../drives/drives_request_builder.py | 146 ++++++++++ .../external_columns_request_builder.py | 146 ++++++++++ ...get_activities_by_interval_get_response.py | 57 ++++ ..._activities_by_interval_request_builder.py | 141 ++++++++++ ...nd_date_time_with_interval_get_response.py | 57 ++++ ...date_time_with_interval_request_builder.py | 148 +++++++++++ ...ypes_for_list_with_list_id_get_response.py | 57 ++++ ...s_for_list_with_list_id_request_builder.py | 144 ++++++++++ .../analytics/analytics_request_builder.py | 215 +++++++++++++++ .../columns/columns_request_builder.py | 203 ++++++++++++++ .../content_types_request_builder.py | 203 ++++++++++++++ .../created_by_user_request_builder.py | 116 ++++++++ .../drive/drive_request_builder.py | 116 ++++++++ .../drives/drives_request_builder.py | 146 ++++++++++ .../external_columns_request_builder.py | 146 ++++++++++ .../get_by_path_with_path1_request_builder.py | 249 ++++++++++++++++++ .../items/items_request_builder.py | 146 ++++++++++ .../last_modified_by_user_request_builder.py | 116 ++++++++ .../lists/lists_request_builder.py | 203 ++++++++++++++ .../onenote/onenote_request_builder.py | 215 +++++++++++++++ .../operations/operations_request_builder.py | 202 ++++++++++++++ .../permissions_request_builder.py | 203 ++++++++++++++ .../sites/sites_request_builder.py | 147 +++++++++++ .../term_store/term_store_request_builder.py | 217 +++++++++++++++ .../term_stores_request_builder.py | 201 ++++++++++++++ .../get_by_path_with_path_request_builder.py | 215 +++++++++++++++ .../items/items_request_builder.py | 146 ++++++++++ .../last_modified_by_user_request_builder.py | 116 ++++++++ .../lists/lists_request_builder.py | 203 ++++++++++++++ .../onenote/onenote_request_builder.py | 215 +++++++++++++++ .../operations/operations_request_builder.py | 202 ++++++++++++++ .../permissions_request_builder.py | 203 ++++++++++++++ .../sites/sites_request_builder.py | 147 +++++++++++ .../term_store/term_store_request_builder.py | 217 +++++++++++++++ .../term_stores_request_builder.py | 201 ++++++++++++++ .../lists/item/list_item_request_builder.py | 8 +- ...onversation_member_item_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 6 +- ...onversation_member_item_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 6 +- .../messages/messages_request_builder.py | 6 +- .../schedule/share/share_request_builder.py | 4 +- ...onversation_member_item_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 6 +- ...onversation_member_item_request_builder.py | 8 +- .../item/replies/replies_request_builder.py | 6 +- .../employee_experience_request_builder.py | 13 + ...ernalcourse_activity_id_request_builder.py | 120 +++++++++ .../item/events/events_request_builder.py | 6 +- ...onversation_member_item_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 6 +- .../item/messages/messages_request_builder.py | 6 +- ...onversation_member_item_request_builder.py | 6 +- .../item/replies/replies_request_builder.py | 6 +- .../messages/messages_request_builder.py | 6 +- .../schedule/share/share_request_builder.py | 4 +- .../child_folders_request_builder.py | 6 +- .../attachments_request_builder.py | 6 +- .../attachments_request_builder.py | 6 +- .../attachments_request_builder.py | 6 +- .../item/message_item_request_builder.py | 2 +- .../item/value/content_request_builder.py | 2 +- .../item/messages/messages_request_builder.py | 8 +- .../item/presence/presence_request_builder.py | 8 +- .../users/item/user_item_request_builder.py | 12 +- .../generated/users/users_request_builder.py | 8 +- 279 files changed, 24521 insertions(+), 348 deletions(-) create mode 100644 msgraph/generated/applications/item/synchronization/secrets/secrets_put_request_body.py create mode 100644 msgraph/generated/applications/item/synchronization/secrets/secrets_put_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/format/format_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_get_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_get_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_request_builder.py create mode 100644 msgraph/generated/drives/item/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/drives/item/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/drives/item/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/drives/item/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/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_post_request_body.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_post_request_body.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/format/format_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image/image_get_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image/image_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_get_response.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_request_builder.py create mode 100644 msgraph/generated/drives/item/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/drives/item/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/drives/item/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/drives/item/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/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_post_request_body.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_post_request_body.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/title/title_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/drives/item/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/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_request_builder.py create mode 100644 msgraph/generated/drives/item/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/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/drives/item/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/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py create mode 100644 msgraph/generated/employee_experience/learning_providers/item/learning_contents_with_external_id/learning_contents_with_external_id_request_builder.py create mode 100644 msgraph/generated/employee_experience/learning_providers/item/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/analytics/analytics_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/columns/columns_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/drive/drive_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/drives/drives_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/external_columns/external_columns_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_get_response.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/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/groups/item/sites/item/get_by_path_with_path/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/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/items/items_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/lists/lists_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/onenote/onenote_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/operations/operations_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/sites/sites_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_store/term_store_request_builder.py create mode 100644 msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py create mode 100644 msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_request_body.py create mode 100644 msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_response.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/analytics/analytics_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/columns/columns_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/drive/drive_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/drives/drives_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/external_columns/external_columns_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_get_response.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/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/sites/item/get_by_path_with_path/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/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/items/items_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/lists/lists_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/onenote/onenote_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/operations/operations_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/sites/sites_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/term_store/term_store_request_builder.py create mode 100644 msgraph/generated/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py create mode 100644 msgraph/generated/users/item/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py diff --git a/msgraph/generated/applications/item/synchronization/secrets/secrets_put_request_body.py b/msgraph/generated/applications/item/synchronization/secrets/secrets_put_request_body.py new file mode 100644 index 00000000000..59be3fc6130 --- /dev/null +++ b/msgraph/generated/applications/item/synchronization/secrets/secrets_put_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.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + +@dataclass +class SecretsPutRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described 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[List[SynchronizationSecretKeyStringValuePair]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SecretsPutRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SecretsPutRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SecretsPutRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(SynchronizationSecretKeyStringValuePair)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current 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("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/applications/item/synchronization/secrets/secrets_put_response.py b/msgraph/generated/applications/item/synchronization/secrets/secrets_put_response.py new file mode 100644 index 00000000000..ec04b19ebfc --- /dev/null +++ b/msgraph/generated/applications/item/synchronization/secrets/secrets_put_response.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.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + +@dataclass +class SecretsPutResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described 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[List[SynchronizationSecretKeyStringValuePair]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SecretsPutResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SecretsPutResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SecretsPutResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(SynchronizationSecretKeyStringValuePair)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current 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("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/applications/item/synchronization/secrets/secrets_request_builder.py b/msgraph/generated/applications/item/synchronization/secrets/secrets_request_builder.py index baf5bb3e0c7..95509e2b6c4 100644 --- a/msgraph/generated/applications/item/synchronization/secrets/secrets_request_builder.py +++ b/msgraph/generated/applications/item/synchronization/secrets/secrets_request_builder.py @@ -11,8 +11,9 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair from .count.count_request_builder import CountRequestBuilder + from .secrets_put_request_body import SecretsPutRequestBody + from .secrets_put_response import SecretsPutResponse class SecretsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +28,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/applications/{application%2Did}/synchronization/secrets", path_parameters) - async def put(self,body: Optional[List[SynchronizationSecretKeyStringValuePair]] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> Optional[List[SynchronizationSecretKeyStringValuePair]]: + async def put(self,body: Optional[SecretsPutRequestBody] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> Optional[SecretsPutResponse]: """ Update property secrets value. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[List[SynchronizationSecretKeyStringValuePair]] + Returns: Optional[SecretsPutResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,11 +48,11 @@ async def put(self,body: Optional[List[SynchronizationSecretKeyStringValuePair]] } if not self.request_adapter: raise Exception("Http core is null") - from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + from .secrets_put_response import SecretsPutResponse - return await self.request_adapter.send_collection_async(request_info, SynchronizationSecretKeyStringValuePair, error_mapping) + return await self.request_adapter.send_async(request_info, SecretsPutResponse, error_mapping) - def to_put_request_information(self,body: Optional[List[SynchronizationSecretKeyStringValuePair]] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: + def to_put_request_information(self,body: Optional[SecretsPutRequestBody] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ Update property secrets value. param body: The request body diff --git a/msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py index 8d2a4f64089..9a08a4a2709 100644 --- a/msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/chats/item/members/item/conversation_member_item_request_builder.py @@ -48,10 +48,10 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Retrieve a conversationMember from a chat. + Retrieve a conversationMember from a chat or channel. 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/chat-get-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -110,7 +110,7 @@ def to_delete_request_information(self,request_configuration: Optional[Conversat def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a conversationMember from a chat. + Retrieve a conversationMember from a chat or channel. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Retrieve a conversationMember from a chat. + Retrieve a conversationMember from a chat or channel. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/chats/item/messages/item/replies/replies_request_builder.py b/msgraph/generated/chats/item/messages/item/replies/replies_request_builder.py index 50b20cdc047..bebd6bf6b4d 100644 --- a/msgraph/generated/chats/item/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/chats/item/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/communications/calls/item/participants/invite/invite_request_builder.py b/msgraph/generated/communications/calls/item/participants/invite/invite_request_builder.py index 24cd2df5899..d9a767c2597 100644 --- a/msgraph/generated/communications/calls/item/participants/invite/invite_request_builder.py +++ b/msgraph/generated/communications/calls/item/participants/invite/invite_request_builder.py @@ -29,11 +29,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[InvitePostRequestBody] = None, request_configuration: Optional[InviteRequestBuilderPostRequestConfiguration] = None) -> Optional[InviteParticipantsOperation]: """ - Invite participants to the active call. For more information about how to handle operations, see commsOperation. + Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[InviteParticipantsOperation] - Find more info here: https://learn.microsoft.com/graph/api/participant-invite?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/participant-delete?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -54,7 +54,7 @@ async def post(self,body: Optional[InvitePostRequestBody] = None, request_config def to_post_request_information(self,body: Optional[InvitePostRequestBody] = None, request_configuration: Optional[InviteRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Invite participants to the active call. For more information about how to handle operations, see commsOperation. + Delete a specific participant in a call. In some situations, it is appropriate for an application to remove a participant from an active call. This action can be done before or after the participant answers the call. When an active caller is removed, they are immediately dropped from the call with no pre- or post-removal notification. When an invited participant is removed, any outstanding add participant request is canceled. 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 9cce9c19f74..fd83051f53b 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 @@ -46,7 +46,7 @@ async def get(self,request_configuration: Optional[DeviceAppManagementRequestBui 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-onboarding-deviceappmanagement-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-deviceappmanagement-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -69,7 +69,7 @@ async def patch(self,body: Optional[DeviceAppManagement] = None, request_configu 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-policyset-deviceappmanagement-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-unlock-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/item/managed_app_policy_item_request_builder.py b/msgraph/generated/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.py index 90beb127e2e..aed9d67aa88 100644 --- a/msgraph/generated/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_policies/item/managed_app_policy_item_request_builder.py @@ -48,10 +48,10 @@ async def delete(self,request_configuration: Optional[ManagedAppPolicyItemReques async def get(self,request_configuration: Optional[ManagedAppPolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedAppPolicy]: """ - Read properties and relationships of the managedAppConfiguration object. + Read properties and relationships of the managedAppProtection object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedAppPolicy] - Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -110,7 +110,7 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp def to_get_request_information(self,request_configuration: Optional[ManagedAppPolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the managedAppConfiguration object. + Read properties and relationships of the managedAppProtection object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -177,7 +177,7 @@ class ManagedAppPolicyItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ManagedAppPolicyItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the managedAppConfiguration object. + Read properties and relationships of the managedAppProtection object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.py b/msgraph/generated/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.py index 6a9405cdf4a..12450cacac5 100644 --- a/msgraph/generated/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_policies/item/target_apps/target_apps_request_builder.py @@ -32,7 +32,7 @@ async def post(self,body: Optional[TargetAppsPostRequestBody] = None, request_co 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/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-targetapps?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 f3085e28658..5aae95c325c 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 @@ -45,10 +45,10 @@ def by_managed_app_policy_id(self,managed_app_policy_id: str) -> ManagedAppPolic async def get(self,request_configuration: Optional[ManagedAppPoliciesRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedAppPolicyCollectionResponse]: """ - List properties and relationships of the managedAppConfiguration objects. + List properties and relationships of the managedAppProtection 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-managedappconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -91,7 +91,7 @@ async def post(self,body: Optional[ManagedAppPolicy] = None, request_configurati def to_get_request_information(self,request_configuration: Optional[ManagedAppPoliciesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the managedAppConfiguration objects. + List properties and relationships of the managedAppProtection objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ManagedAppPoliciesRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedAppConfiguration objects. + List properties and relationships of the managedAppProtection objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.py index 2759cd847a8..338f0652c3b 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/applied_policies/item/target_apps/target_apps_request_builder.py @@ -32,7 +32,7 @@ async def post(self,body: Optional[TargetAppsPostRequestBody] = None, request_co 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/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.py index 514d972dbae..b7b7865c416 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/intended_policies/item/target_apps/target_apps_request_builder.py @@ -32,7 +32,7 @@ async def post(self,body: Optional[TargetAppsPostRequestBody] = None, request_co 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/intune-mam-managedapppolicy-targetapps?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-targetapps?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") 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 742c3bad14f..6ca407530ab 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 @@ -50,10 +50,10 @@ async def delete(self,request_configuration: Optional[ManagedAppRegistrationItem async def get(self,request_configuration: Optional[ManagedAppRegistrationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedAppRegistration]: """ - Read properties and relationships of the iosManagedAppRegistration object. + Read properties and relationships of the managedAppRegistration 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-iosmanagedappregistration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappregistration-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[ManagedAp def to_get_request_information(self,request_configuration: Optional[ManagedAppRegistrationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the iosManagedAppRegistration object. + Read properties and relationships of the managedAppRegistration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -197,7 +197,7 @@ class ManagedAppRegistrationItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class ManagedAppRegistrationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the iosManagedAppRegistration object. + Read properties and relationships of the managedAppRegistration object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.py index 21838f59dd0..869be61316b 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/managed_app_registrations_request_builder.py @@ -46,10 +46,10 @@ def by_managed_app_registration_id(self,managed_app_registration_id: str) -> Man async def get(self,request_configuration: Optional[ManagedAppRegistrationsRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedAppRegistrationCollectionResponse]: """ - List properties and relationships of the androidManagedAppRegistration objects. + List properties and relationships of the iosManagedAppRegistration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedAppRegistrationCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-mam-androidmanagedappregistration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-iosmanagedappregistration-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -93,7 +93,7 @@ async def post(self,body: Optional[ManagedAppRegistration] = None, request_confi def to_get_request_information(self,request_configuration: Optional[ManagedAppRegistrationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the androidManagedAppRegistration objects. + List properties and relationships of the iosManagedAppRegistration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -159,7 +159,7 @@ def get_user_ids_with_flagged_app_registration(self) -> GetUserIdsWithFlaggedApp @dataclass class ManagedAppRegistrationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the androidManagedAppRegistration objects. + List properties and relationships of the iosManagedAppRegistration objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.py b/msgraph/generated/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.py index 41cd2f475e2..ab8bd76cfdf 100644 --- a/msgraph/generated/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_statuses/item/managed_app_status_item_request_builder.py @@ -47,10 +47,10 @@ async def delete(self,request_configuration: Optional[ManagedAppStatusItemReques async def get(self,request_configuration: Optional[ManagedAppStatusItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedAppStatus]: """ - Read properties and relationships of the managedAppStatus object. + Read properties and relationships of the managedAppStatusRaw object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedAppStatus] - Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappstatus-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappstatusraw-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -109,7 +109,7 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedAp def to_get_request_information(self,request_configuration: Optional[ManagedAppStatusItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the managedAppStatus object. + Read properties and relationships of the managedAppStatusRaw object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -167,7 +167,7 @@ class ManagedAppStatusItemRequestBuilderDeleteRequestConfiguration(BaseRequestCo @dataclass class ManagedAppStatusItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the managedAppStatus object. + Read properties and relationships of the managedAppStatusRaw object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 d910207e120..c375f78aa24 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 @@ -45,10 +45,10 @@ def by_managed_e_book_assignment_id(self,managed_e_book_assignment_id: str) -> M async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedEBookAssignmentCollectionResponse]: """ - List properties and relationships of the managedEBookAssignment objects. + List properties and relationships of the iosVppEBookAssignment 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-managedebookassignment-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-iosvppebookassignment-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -67,11 +67,11 @@ async def get(self,request_configuration: Optional[AssignmentsRequestBuilderGetR async def post(self,body: Optional[ManagedEBookAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[ManagedEBookAssignment]: """ - Create a new iosVppEBookAssignment object. + Create a new managedEBookAssignment 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-iosvppebookassignment-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebookassignment-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -92,7 +92,7 @@ async def post(self,body: Optional[ManagedEBookAssignment] = None, request_confi def to_get_request_information(self,request_configuration: Optional[AssignmentsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the managedEBookAssignment objects. + List properties and relationships of the iosVppEBookAssignment objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -109,7 +109,7 @@ def to_get_request_information(self,request_configuration: Optional[AssignmentsR def to_post_request_information(self,body: Optional[ManagedEBookAssignment] = None, request_configuration: Optional[AssignmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new iosVppEBookAssignment object. + Create a new managedEBookAssignment object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AssignmentsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedEBookAssignment objects. + List properties and relationships of the iosVppEBookAssignment objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 1d02c700380..b527baf1650 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 @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ManagedEBookAssignmentItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[ManagedEBookAssignmentItemReq async def patch(self,body: Optional[ManagedEBookAssignment] = None, request_configuration: Optional[ManagedEBookAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[ManagedEBookAssignment]: """ - Update the properties of a iosVppEBookAssignment object. + Update the properties of a managedEBookAssignment 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-iosvppebookassignment-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebookassignment-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ManagedEBookAssignment] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[ManagedEBookAssignmentItemRequestBuilderDeleteRequestConfiguration] = 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 """ @@ -128,7 +128,7 @@ def to_get_request_information(self,request_configuration: Optional[ManagedEBook def to_patch_request_information(self,body: Optional[ManagedEBookAssignment] = None, request_configuration: Optional[ManagedEBookAssignmentItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a iosVppEBookAssignment object. + Update the properties of a managedEBookAssignment object. 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/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 49ee25e68e4..9d3b9c9c4ad 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 @@ -54,10 +54,10 @@ async def delete(self,request_configuration: Optional[ManagedDeviceMobileAppConf async def get(self,request_configuration: Optional[ManagedDeviceMobileAppConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedDeviceMobileAppConfiguration]: """ - Read properties and relationships of the managedDeviceMobileAppConfiguration object. + Read properties and relationships of the iosMobileAppConfiguration 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-manageddevicemobileappconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-iosmobileappconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -117,7 +117,7 @@ def to_delete_request_information(self,request_configuration: Optional[ManagedDe def to_get_request_information(self,request_configuration: Optional[ManagedDeviceMobileAppConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the managedDeviceMobileAppConfiguration object. + Read properties and relationships of the iosMobileAppConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -229,7 +229,7 @@ class ManagedDeviceMobileAppConfigurationItemRequestBuilderDeleteRequestConfigur @dataclass class ManagedDeviceMobileAppConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the managedDeviceMobileAppConfiguration object. + Read properties and relationships of the iosMobileAppConfiguration object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 520388eb929..2674f5d344f 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 @@ -45,10 +45,10 @@ def by_managed_device_mobile_app_configuration_id(self,managed_device_mobile_app async def get(self,request_configuration: Optional[MobileAppConfigurationsRequestBuilderGetRequestConfiguration] = None) -> Optional[ManagedDeviceMobileAppConfigurationCollectionResponse]: """ - List properties and relationships of the iosMobileAppConfiguration objects. + List properties and relationships of the managedDeviceMobileAppConfiguration 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-iosmobileappconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-manageddevicemobileappconfiguration-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -92,7 +92,7 @@ async def post(self,body: Optional[ManagedDeviceMobileAppConfiguration] = None, def to_get_request_information(self,request_configuration: Optional[MobileAppConfigurationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the iosMobileAppConfiguration objects. + List properties and relationships of the managedDeviceMobileAppConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MobileAppConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the iosMobileAppConfiguration objects. + List properties and relationships of the managedDeviceMobileAppConfiguration objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 6c6e402758d..890e7efc616 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 @@ -47,10 +47,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[MobileAppItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a windowsAppX. + Deletes a managedIOSLobApp. 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-windowsappx-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-managedioslobapp-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -67,10 +67,10 @@ async def delete(self,request_configuration: Optional[MobileAppItemRequestBuilde async def get(self,request_configuration: Optional[MobileAppItemRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileApp]: """ - Read properties and relationships of the windowsMicrosoftEdgeApp object. + Read properties and relationships of the windowsAppX 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-windowsmicrosoftedgeapp-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowsappx-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -89,11 +89,11 @@ async def get(self,request_configuration: Optional[MobileAppItemRequestBuilderGe async def patch(self,body: Optional[MobileApp] = None, request_configuration: Optional[MobileAppItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[MobileApp]: """ - Update the properties of a iosiPadOSWebClip object. + Update the properties of a managedAndroidStoreApp 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-iosipadoswebclip-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-managedandroidstoreapp-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -114,7 +114,7 @@ async def patch(self,body: Optional[MobileApp] = None, request_configuration: Op def to_delete_request_information(self,request_configuration: Optional[MobileAppItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a windowsAppX. + Deletes a managedIOSLobApp. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -130,7 +130,7 @@ def to_delete_request_information(self,request_configuration: Optional[MobileApp def to_get_request_information(self,request_configuration: Optional[MobileAppItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the windowsMicrosoftEdgeApp object. + Read properties and relationships of the windowsAppX object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -147,7 +147,7 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppIte def to_patch_request_information(self,body: Optional[MobileApp] = None, request_configuration: Optional[MobileAppItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a iosiPadOSWebClip object. + Update the properties of a managedAndroidStoreApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -359,7 +359,7 @@ class MobileAppItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class MobileAppItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the windowsMicrosoftEdgeApp object. + Read properties and relationships of the windowsAppX object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 95e61a51e29..8e067cad11c 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 @@ -61,10 +61,10 @@ def by_mobile_app_id(self,mobile_app_id: str) -> MobileAppItemRequestBuilder: async def get(self,request_configuration: Optional[MobileAppsRequestBuilderGetRequestConfiguration] = None) -> Optional[MobileAppCollectionResponse]: """ - List properties and relationships of the windowsAppX 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-windowsappx-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 @@ -83,11 +83,11 @@ async def get(self,request_configuration: Optional[MobileAppsRequestBuilderGetRe async def post(self,body: Optional[MobileApp] = None, request_configuration: Optional[MobileAppsRequestBuilderPostRequestConfiguration] = None) -> Optional[MobileApp]: """ - Create a new windowsUniversalAppX object. + Create a new macOSMicrosoftEdgeApp 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-windowsuniversalappx-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-macosmicrosoftedgeapp-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -108,7 +108,7 @@ async def post(self,body: Optional[MobileApp] = None, request_configuration: Opt def to_get_request_information(self,request_configuration: Optional[MobileAppsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the windowsAppX 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 """ @@ -125,7 +125,7 @@ def to_get_request_information(self,request_configuration: Optional[MobileAppsRe def to_post_request_information(self,body: Optional[MobileApp] = None, request_configuration: Optional[MobileAppsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new windowsUniversalAppX object. + Create a new macOSMicrosoftEdgeApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -309,7 +309,7 @@ def graph_windows_web_app(self) -> GraphWindowsWebAppRequestBuilder: @dataclass class MobileAppsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the windowsAppX objects. + List properties and relationships of the macOSLobApp objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 be1fc021b8c..9693cda0240 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 @@ -67,11 +67,11 @@ async def get(self,request_configuration: Optional[DeviceCompliancePoliciesReque async def post(self,body: Optional[DeviceCompliancePolicy] = None, request_configuration: Optional[DeviceCompliancePoliciesRequestBuilderPostRequestConfiguration] = None) -> Optional[DeviceCompliancePolicy]: """ - Create a new androidWorkProfileCompliancePolicy 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-androidworkprofilecompliancepolicy-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.") @@ -109,7 +109,7 @@ def to_get_request_information(self,request_configuration: Optional[DeviceCompli def to_post_request_information(self,body: Optional[DeviceCompliancePolicy] = None, request_configuration: Optional[DeviceCompliancePoliciesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new androidWorkProfileCompliancePolicy 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 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 bb15ca3ec06..a66f93a19cd 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 @@ -37,10 +37,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a windows81CompliancePolicy. + Deletes a androidWorkProfileCompliancePolicy. 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-windows81compliancepolicy-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidworkprofilecompliancepolicy-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -57,10 +57,10 @@ async def delete(self,request_configuration: Optional[DeviceCompliancePolicyItem async def get(self,request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceCompliancePolicy]: """ - Read properties and relationships of the windows10CompliancePolicy object. + Read properties and relationships of the windows81CompliancePolicy 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-windows10compliancepolicy-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows81compliancepolicy-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -79,11 +79,11 @@ async def get(self,request_configuration: Optional[DeviceCompliancePolicyItemReq async def patch(self,body: Optional[DeviceCompliancePolicy] = None, request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[DeviceCompliancePolicy]: """ - Update the properties of a iosCompliancePolicy 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-ioscompliancepolicy-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: Optional[DeviceCompliancePolicy] = None, request_conf def to_delete_request_information(self,request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a windows81CompliancePolicy. + Deletes a androidWorkProfileCompliancePolicy. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -120,7 +120,7 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCom def to_get_request_information(self,request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the windows10CompliancePolicy object. + Read properties and relationships of the windows81CompliancePolicy 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[DeviceCompli def to_patch_request_information(self,body: Optional[DeviceCompliancePolicy] = None, request_configuration: Optional[DeviceCompliancePolicyItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a iosCompliancePolicy 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 @@ -259,7 +259,7 @@ class DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class DeviceCompliancePolicyItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the windows10CompliancePolicy object. + Read properties and relationships of the windows81CompliancePolicy object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 1493fa805ab..4b2a8235db8 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 @@ -45,10 +45,10 @@ def by_device_configuration_id(self,device_configuration_id: str) -> DeviceConfi async def get(self,request_configuration: Optional[DeviceConfigurationsRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceConfigurationCollectionResponse]: """ - List properties and relationships of the sharedPCConfiguration objects. + List properties and relationships of the iosCertificateProfile 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-sharedpcconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-ioscertificateprofile-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -67,11 +67,11 @@ async def get(self,request_configuration: Optional[DeviceConfigurationsRequestBu async def post(self,body: Optional[DeviceConfiguration] = None, request_configuration: Optional[DeviceConfigurationsRequestBuilderPostRequestConfiguration] = None) -> Optional[DeviceConfiguration]: """ - Create a new sharedPCConfiguration object. + Create a new windowsPhone81CustomConfiguration 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-sharedpcconfiguration-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windowsphone81customconfiguration-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -92,7 +92,7 @@ async def post(self,body: Optional[DeviceConfiguration] = None, request_configur def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the sharedPCConfiguration objects. + List properties and relationships of the iosCertificateProfile objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -109,7 +109,7 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig def to_post_request_information(self,body: Optional[DeviceConfiguration] = None, request_configuration: Optional[DeviceConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new sharedPCConfiguration object. + Create a new windowsPhone81CustomConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DeviceConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the sharedPCConfiguration objects. + List properties and relationships of the iosCertificateProfile objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 4d4843a1e28..ebfde3a6141 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 @@ -36,10 +36,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a macOSGeneralDeviceConfiguration. + Deletes a androidWorkProfileCustomConfiguration. 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-macosgeneraldeviceconfiguration-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidworkprofilecustomconfiguration-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -56,10 +56,10 @@ async def delete(self,request_configuration: Optional[DeviceConfigurationItemReq async def get(self,request_configuration: Optional[DeviceConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceConfiguration]: """ - Read properties and relationships of the iosGeneralDeviceConfiguration object. + Read properties and relationships of the iosUpdateConfiguration 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-iosgeneraldeviceconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-iosupdateconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -90,11 +90,11 @@ def get_oma_setting_plain_text_value_with_secret_reference_value_id(self,secret_ async def patch(self,body: Optional[DeviceConfiguration] = None, request_configuration: Optional[DeviceConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[DeviceConfiguration]: """ - Update the properties of a androidWorkProfileGeneralDeviceConfiguration object. + Update the properties of a windowsPhone81CustomConfiguration 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-androidworkprofilegeneraldeviceconfiguration-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windowsphone81customconfiguration-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -115,7 +115,7 @@ async def patch(self,body: Optional[DeviceConfiguration] = None, request_configu def to_delete_request_information(self,request_configuration: Optional[DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a macOSGeneralDeviceConfiguration. + Deletes a androidWorkProfileCustomConfiguration. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -131,7 +131,7 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceCon def to_get_request_information(self,request_configuration: Optional[DeviceConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the iosGeneralDeviceConfiguration object. + Read properties and relationships of the iosUpdateConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -148,7 +148,7 @@ def to_get_request_information(self,request_configuration: Optional[DeviceConfig def to_patch_request_information(self,body: Optional[DeviceConfiguration] = None, request_configuration: Optional[DeviceConfigurationItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a androidWorkProfileGeneralDeviceConfiguration object. + Update the properties of a windowsPhone81CustomConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -252,7 +252,7 @@ class DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration(BaseReques @dataclass class DeviceConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the iosGeneralDeviceConfiguration object. + Read properties and relationships of the iosUpdateConfiguration object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 ebc96176b52..8fdef524ff5 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 @@ -45,10 +45,10 @@ def by_device_enrollment_configuration_id(self,device_enrollment_configuration_i async def get(self,request_configuration: Optional[DeviceEnrollmentConfigurationsRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceEnrollmentConfigurationCollectionResponse]: """ - List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + List properties and relationships of the deviceEnrollmentConfiguration 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-deviceenrollmentconfiguration-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -67,11 +67,11 @@ async def get(self,request_configuration: Optional[DeviceEnrollmentConfiguration async def post(self,body: Optional[DeviceEnrollmentConfiguration] = None, request_configuration: Optional[DeviceEnrollmentConfigurationsRequestBuilderPostRequestConfiguration] = None) -> Optional[DeviceEnrollmentConfiguration]: """ - Create a new deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Create a new deviceEnrollmentLimitConfiguration 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-deviceenrollmentwindowshelloforbusinessconfiguration-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentlimitconfiguration-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -92,7 +92,7 @@ async def post(self,body: Optional[DeviceEnrollmentConfiguration] = None, reques def to_get_request_information(self,request_configuration: Optional[DeviceEnrollmentConfigurationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + List properties and relationships of the deviceEnrollmentConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -109,7 +109,7 @@ def to_get_request_information(self,request_configuration: Optional[DeviceEnroll def to_post_request_information(self,body: Optional[DeviceEnrollmentConfiguration] = None, request_configuration: Optional[DeviceEnrollmentConfigurationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Create a new deviceEnrollmentLimitConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -149,7 +149,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DeviceEnrollmentConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + List properties and relationships of the deviceEnrollmentConfiguration objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> 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 ede7fa86994..b281a51d0d4 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 @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Deletes a deviceEnrollmentLimitConfiguration. + Deletes a deviceEnrollmentWindowsHelloForBusinessConfiguration. 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-deviceenrollmentlimitconfiguration-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentwindowshelloforbusinessconfiguration-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[DeviceEnrollmentConfigurat async def get(self,request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> Optional[DeviceEnrollmentConfiguration]: """ - Read properties and relationships of the deviceEnrollmentConfiguration object. + Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration 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-deviceenrollmentconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentwindowshelloforbusinessconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -98,7 +98,7 @@ async def patch(self,body: Optional[DeviceEnrollmentConfiguration] = None, reque def to_delete_request_information(self,request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Deletes a deviceEnrollmentLimitConfiguration. + Deletes a deviceEnrollmentWindowsHelloForBusinessConfiguration. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -114,7 +114,7 @@ def to_delete_request_information(self,request_configuration: Optional[DeviceEnr def to_get_request_information(self,request_configuration: Optional[DeviceEnrollmentConfigurationItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read properties and relationships of the deviceEnrollmentConfiguration object. + Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -199,7 +199,7 @@ class DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration( @dataclass class DeviceEnrollmentConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the deviceEnrollmentConfiguration object. + Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/device_management/device_management_request_builder.py b/msgraph/generated/device_management/device_management_request_builder.py index e74dabf245f..f7d6e868171 100644 --- a/msgraph/generated/device_management/device_management_request_builder.py +++ b/msgraph/generated/device_management/device_management_request_builder.py @@ -92,7 +92,7 @@ async def get(self,request_configuration: Optional[DeviceManagementRequestBuilde 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-notification-devicemanagement-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-tem-devicemanagement-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -127,7 +127,7 @@ async def patch(self,body: Optional[DeviceManagement] = None, request_configurat 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-raimportcerts-devicemanagement-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-reporting-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 d41cd7b34db..dc2cdffc6f5 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 @@ -49,10 +49,10 @@ async def delete(self,request_configuration: Optional[RoleDefinitionItemRequestB async def get(self,request_configuration: Optional[RoleDefinitionItemRequestBuilderGetRequestConfiguration] = 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 @@ -112,7 +112,7 @@ def to_delete_request_information(self,request_configuration: Optional[RoleDefin def to_get_request_information(self,request_configuration: Optional[RoleDefinitionItemRequestBuilderGetRequestConfiguration] = 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 """ @@ -179,7 +179,7 @@ class RoleDefinitionItemRequestBuilderDeleteRequestConfiguration(BaseRequestConf @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: Optional[str] = None) -> 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 bf8ad95d119..4e6a4f09b89 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 @@ -67,11 +67,11 @@ async def get(self,request_configuration: Optional[RoleDefinitionsRequestBuilder async def post(self,body: Optional[RoleDefinition] = None, request_configuration: Optional[RoleDefinitionsRequestBuilderPostRequestConfiguration] = None) -> Optional[RoleDefinition]: """ - Create a new deviceAndAppManagementRoleDefinition object. + Create a new roleDefinition object. param body: The request body 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-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-rbac-roledefinition-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -109,7 +109,7 @@ def to_get_request_information(self,request_configuration: Optional[RoleDefiniti def to_post_request_information(self,body: Optional[RoleDefinition] = None, request_configuration: Optional[RoleDefinitionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new deviceAndAppManagementRoleDefinition object. + Create a new roleDefinition object. 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/drive_item_item_request_builder.py b/msgraph/generated/drives/item/items/item/drive_item_item_request_builder.py index 24f2c47fba1..7ced422a5f5 100644 --- a/msgraph/generated/drives/item/items/item/drive_item_item_request_builder.py +++ b/msgraph/generated/drives/item/items/item/drive_item_item_request_builder.py @@ -130,11 +130,11 @@ def get_activities_by_interval_with_start_date_time_with_end_date_time_with_inte async def patch(self,body: Optional[DriveItem] = None, request_configuration: Optional[DriveItemItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[DriveItem]: """ - To move a DriveItem to a new parent item, your app requests to update the parentReference of the DriveItem to move. This is a special case of the Update method.Your app can combine moving an item to a new container and updating other properties of the item into a single request. Items cannot be moved between Drives using this request. + Update the metadata for a driveItem by ID or path. You can also use update to move an item to another parent by updating the item's parentReference property. 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-move?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/driveitem-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -200,7 +200,7 @@ def to_get_request_information(self,request_configuration: Optional[DriveItemIte def to_patch_request_information(self,body: Optional[DriveItem] = None, request_configuration: Optional[DriveItemItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - To move a DriveItem to a new parent item, your app requests to update the parentReference of the DriveItem to move. This is a special case of the Update method.Your app can combine moving an item to a new container and updating other properties of the item into a single request. Items cannot be moved between Drives using this request. + Update the metadata for a driveItem by ID or path. You can also use update to move an item to another parent by updating the item's parentReference property. 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 7b0d37b61f1..b4f661d2868 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 @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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. + Retrieve the properties and relationships of range object. 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 + Find more info here: https://learn.microsoft.com/graph/api/range-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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. + Retrieve the properties and relationships of range object. 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/tables/item/columns/columns_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/columns_request_builder.py index 6dfab53c380..a151cfdc7e3 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/columns_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/columns_request_builder.py @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque Retrieve a list of tablecolumn objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumnCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/table-list-columns?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/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..d07be183cf9 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/data_body_range/data_body_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_request_builder.py new file mode 100644 index 00000000000..1877b6b7990 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/filter{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[FilterRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property filter for drives + 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] = { + "4XX": ODataError, + "5XX": 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[FilterRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookFilter] = None, request_configuration: Optional[FilterRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookFilter]: + """ + Update the navigation property filter in drives + 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] = { + "4XX": ODataError, + "5XX": 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[FilterRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property filter for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[FilterRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookFilter] = None, request_configuration: Optional[FilterRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property filter in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilterRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class FilterRequestBuilderGetQueryParameters(): + """ + Retrieve the filter applied to the column. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilterRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[FilterRequestBuilder.FilterRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilterRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/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..3147a9b6919 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/header_row_range/header_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py index b6d63fbae67..453f109844a 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,11 @@ 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): """ @@ -76,6 +81,51 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..d54f9ff4967 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/range/range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[RangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/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..616f809f06a --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/columns/item_at_with_index/total_row_range/total_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py index 33e646ba007..3d7a68c0454 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,7 @@ 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): """ @@ -76,6 +77,15 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..51323c998e9 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/item_at_with_index/range/range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[RangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/rows_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/rows_request_builder.py index 0f8dc1795f8..f01cb22982b 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/rows_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item/rows/rows_request_builder.py @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[RowsRequestBuilderGetRequestC Retrieve a list of tablerow objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRowCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/tablerow-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py new file mode 100644 index 00000000000..104d33aaaa0 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/clearFilters", path_parameters) + + async def post(self,request_configuration: Optional[ClearFiltersRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ClearFiltersRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ClearFiltersRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py new file mode 100644 index 00000000000..f6aa5ebbab9 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/columns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumnCollectionResponse]: + """ + Retrieve a list of tablecolumn objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumnCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/table-list-columns?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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookTableColumn] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: + """ + Use this API to create a new TableColumn. + 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/table-post-columns?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] = { + "4XX": ODataError, + "5XX": 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[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a list of tablecolumn objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[WorkbookTableColumn] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Use this API to create a new TableColumn. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Retrieve a list of tablecolumn objects. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ColumnsRequestBuilder.ColumnsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py new file mode 100644 index 00000000000..c1e044dd995 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/convertToRange", path_parameters) + + async def post(self,request_configuration: Optional[ConvertToRangeRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ConvertToRangeRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ConvertToRangeRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..6b6b0147d29 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..2a9bcc4b717 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py index aa144ff2484..4f0c1c78fcc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,17 @@ 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): """ @@ -76,6 +87,105 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..d8bf35e8c4e --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/range/range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[RangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py new file mode 100644 index 00000000000..18cb2cc317e --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/reapplyFilters", path_parameters) + + async def post(self,request_configuration: Optional[ReapplyFiltersRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ReapplyFiltersRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ReapplyFiltersRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py new file mode 100644 index 00000000000..97cb2352a56 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/rows{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[RowsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRowCollectionResponse]: + """ + Retrieve a list of tablerow objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRowCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/tablerow-list?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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookTableRow] = None, request_configuration: Optional[RowsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableRow]: + """ + Adds rows to the end of a table. Note that this API can accept multiple rows of data. Adding one row at a time can affect performance. The recommended approach is to batch the rows together in a single call rather than inserting single rows. For best results, collect the rows to be inserted on the application side and perform a single row add operation. Experiment with the number of rows to determine the ideal number of rows to use in a single API call. This request might occasionally result in a 504 HTTP error. The appropriate response to this error is to repeat the request. + 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/table-post-rows?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] = { + "4XX": ODataError, + "5XX": 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[RowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a list of tablerow objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[WorkbookTableRow] = None, request_configuration: Optional[RowsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Adds rows to the end of a table. Note that this API can accept multiple rows of data. Adding one row at a time can affect performance. The recommended approach is to batch the rows together in a single call rather than inserting single rows. For best results, collect the rows to be inserted on the application side and perform a single row add operation. Experiment with the number of rows to determine the ideal number of rows to use in a single API call. This request might occasionally result in a 504 HTTP error. The appropriate response to this error is to repeat the request. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Retrieve a list of tablerow objects. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RowsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[RowsRequestBuilder.RowsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RowsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py new file mode 100644 index 00000000000..5dc4e3b919d --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py @@ -0,0 +1,216 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/sort{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[SortRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property sort for drives + 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] = { + "4XX": ODataError, + "5XX": 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[SortRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableSort]: + """ + Retrieve the properties and relationships of tablesort object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + Find more info here: https://learn.microsoft.com/graph/api/tablesort-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookTableSort] = None, request_configuration: Optional[SortRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookTableSort]: + """ + Update the navigation property sort in drives + 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] = { + "4XX": ODataError, + "5XX": 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[SortRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property sort for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[SortRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of tablesort object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookTableSort] = None, request_configuration: Optional[SortRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property sort in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SortRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class SortRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of tablesort object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SortRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SortRequestBuilder.SortRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SortRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..2c946dfd350 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..545fb1d1552 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/worksheet{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[WorksheetRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[WorksheetRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[WorksheetRequestBuilder.WorksheetRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/charts_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/charts_request_builder.py index 5a068fa8f31..6e872545657 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/charts_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/charts_request_builder.py @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[ChartsRequestBuilderGetReques Retrieve a list of chart objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/worksheet-list-charts?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chart-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/format/format_request_builder.py b/msgraph/generated/drives/item/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..57d861ea898 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/format/format_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/itemAt(index={index})/format{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[FormatRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property format for drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartPointFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartPointFormat]: + """ + Update the navigation property format in drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property format for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartPointFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property format in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties chart point. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[FormatRequestBuilder.FormatRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py index e7d76b5922c..30a4c07c287 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,7 @@ 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): """ @@ -76,6 +77,15 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py index f6538846b5d..1c731f7f6fc 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py @@ -46,10 +46,10 @@ def by_workbook_chart_point_id(self,workbook_chart_point_id: str) -> WorkbookCha async def get(self,request_configuration: Optional[PointsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartPointCollectionResponse]: """ - Retrieve a list of chartpoint objects. + Retrieve a list of chartpoints objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartPointCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/chartpoint-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chartseries-list-points?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -105,7 +105,7 @@ async def post(self,body: Optional[WorkbookChartPoint] = None, request_configura def to_get_request_information(self,request_configuration: Optional[PointsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of chartpoint objects. + Retrieve a list of chartpoints objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -162,7 +162,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PointsRequestBuilderGetQueryParameters(): """ - Retrieve a list of chartpoint objects. + Retrieve a list of chartpoints objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_request_builder.py new file mode 100644 index 00000000000..71999bd9d7e --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/itemAt(index={index})/format{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[FormatRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property format for drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartSeriesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartSeriesFormat]: + """ + Update the navigation property format in drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property format for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartSeriesFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property format in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[FormatRequestBuilder.FormatRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py index f01304ad9f9..21305645845 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,8 @@ 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): """ @@ -76,6 +78,24 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py new file mode 100644 index 00000000000..257410bf24a --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/itemAt(index={index})/points{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PointsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartPointCollectionResponse]: + """ + Retrieve a list of chartpoints objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPointCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/chartseries-list-points?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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartPoint] = None, request_configuration: Optional[PointsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookChartPoint]: + """ + Use this API to create a new ChartPoints. + param body: The request body + 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/chartseries-post-points?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] = { + "4XX": ODataError, + "5XX": 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[PointsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a list of chartpoints objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[WorkbookChartPoint] = None, request_configuration: Optional[PointsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Use this API to create a new ChartPoints. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Retrieve a list of chartpoints objects. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PointsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[PointsRequestBuilder.PointsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PointsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py index e1efa0434ee..d96d86e7ece 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py @@ -49,7 +49,7 @@ async def get(self,request_configuration: Optional[SeriesRequestBuilderGetReques Retrieve a list of chartseries objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookChartSeriesCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/chartseries-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chart-list-series?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_request_builder.py new file mode 100644 index 00000000000..f2c8a516da6 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/axes{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[AxesRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property axes for drives + 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] = { + "4XX": ODataError, + "5XX": 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[AxesRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartAxes] = None, request_configuration: Optional[AxesRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAxes]: + """ + Update the navigation property axes in drives + 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] = { + "4XX": ODataError, + "5XX": 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[AxesRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property axes for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[AxesRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartAxes] = None, request_configuration: Optional[AxesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property axes in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AxesRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class AxesRequestBuilderGetQueryParameters(): + """ + Represents chart axes. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AxesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[AxesRequestBuilder.AxesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AxesRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_request_builder.py new file mode 100644 index 00000000000..f7488203c45 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/dataLabels{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[DataLabelsRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property dataLabels for drives + 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] = { + "4XX": ODataError, + "5XX": 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[DataLabelsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartDataLabels]: + """ + Retrieve the properties and relationships of chartdatalabels object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + Find more info here: https://learn.microsoft.com/graph/api/chartdatalabels-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartDataLabels] = None, request_configuration: Optional[DataLabelsRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartDataLabels]: + """ + Update the properties of chartdatalabels object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + Find more info here: https://learn.microsoft.com/graph/api/chartdatalabels-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] = { + "4XX": ODataError, + "5XX": 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[DataLabelsRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property dataLabels for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[DataLabelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of chartdatalabels object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartDataLabels] = None, request_configuration: Optional[DataLabelsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of chartdatalabels object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataLabelsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class DataLabelsRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of chartdatalabels object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataLabelsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DataLabelsRequestBuilder.DataLabelsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataLabelsRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_request_builder.py new file mode 100644 index 00000000000..9995a34c50f --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/format{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[FormatRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property format for drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartAreaFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Update the navigation property format in drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property format for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartAreaFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property format in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties for the chart area. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[FormatRequestBuilder.FormatRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_get_response.py new file mode 100644 index 00000000000..c981ba00d64 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_request_builder.py new file mode 100644 index 00000000000..4a6739eda08 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/image()", path_parameters) + + async def get(self,request_configuration: Optional[ImageRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_get_response.py b/msgraph/generated/drives/item/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..81e3e0a8477 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_request_builder.py b/msgraph/generated/drives/item/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..abbd09b1edd --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/image(width={width})", path_parameters) + + async def get(self,request_configuration: Optional[ImageWithWidthRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageWithWidthRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageWithWidthRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/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/drives/item/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..65fcbdfed46 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/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/drives/item/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..1c0eae5ff82 --- /dev/null +++ b/msgraph/generated/drives/item/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,91 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/drives/{drive%2Did}/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[ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/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/drives/item/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..2997b2839f9 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/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/drives/item/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..69612bb276d --- /dev/null +++ b/msgraph/generated/drives/item/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,93 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/drives/{drive%2Did}/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[ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py index 2fdc8004958..84ae7c3d089 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,19 @@ 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): """ @@ -50,6 +63,51 @@ async def get(self,request_configuration: Optional[ItemAtWithIndexRequestBuilder return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + def image_with_width(self,width: Optional[int] = None) -> 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: Optional[int] = None, width: Optional[int] = None) -> 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: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> 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[ItemAtWithIndexRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ Invoke function itemAt @@ -76,6 +134,96 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_request_builder.py new file mode 100644 index 00000000000..2d08f699162 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/legend{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LegendRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property legend for drives + 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] = { + "4XX": ODataError, + "5XX": 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[LegendRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartLegend]: + """ + Retrieve the properties and relationships of chartlegend object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + Find more info here: https://learn.microsoft.com/graph/api/chartlegend-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartLegend] = None, request_configuration: Optional[LegendRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartLegend]: + """ + Update the properties of chartlegend object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + Find more info here: https://learn.microsoft.com/graph/api/chartlegend-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] = { + "4XX": ODataError, + "5XX": 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[LegendRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property legend for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[LegendRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of chartlegend object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartLegend] = None, request_configuration: Optional[LegendRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of chartlegend object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LegendRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LegendRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of chartlegend object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LegendRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LegendRequestBuilder.LegendRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LegendRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py new file mode 100644 index 00000000000..e75767adc77 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/series{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SeriesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartSeriesCollectionResponse]: + """ + Retrieve a list of chartseries objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/chart-list-series?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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartSeries] = None, request_configuration: Optional[SeriesRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookChartSeries]: + """ + Use this API to create a new ChartSeries. + param body: The request body + 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/chart-post-series?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] = { + "4XX": ODataError, + "5XX": 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[SeriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a list of chartseries objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[WorkbookChartSeries] = None, request_configuration: Optional[SeriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Use this API to create a new ChartSeries. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Retrieve a list of chartseries objects. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SeriesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SeriesRequestBuilder.SeriesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SeriesRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_post_request_body.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_post_request_body.py new file mode 100644 index 00000000000..08581000ddb --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py new file mode 100644 index 00000000000..3ce77a4c9f0 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py @@ -0,0 +1,92 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/setData", path_parameters) + + async def post(self,body: Optional[SetDataPostRequestBody] = None, request_configuration: Optional[SetDataRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[SetDataPostRequestBody] = None, request_configuration: Optional[SetDataRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SetDataRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_post_request_body.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_post_request_body.py new file mode 100644 index 00000000000..05a7172a850 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py new file mode 100644 index 00000000000..e941175318e --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py @@ -0,0 +1,92 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/setPosition", path_parameters) + + async def post(self,body: Optional[SetPositionPostRequestBody] = None, request_configuration: Optional[SetPositionRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[SetPositionPostRequestBody] = None, request_configuration: Optional[SetPositionRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SetPositionRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_request_builder.py new file mode 100644 index 00000000000..2019e5ac86b --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/title{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TitleRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property title for drives + 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] = { + "4XX": ODataError, + "5XX": 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[TitleRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartTitle]: + """ + Retrieve the properties and relationships of charttitle object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + Find more info here: https://learn.microsoft.com/graph/api/charttitle-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartTitle]: + """ + Update the properties of charttitle object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + Find more info here: https://learn.microsoft.com/graph/api/charttitle-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] = { + "4XX": ODataError, + "5XX": 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[TitleRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property title for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of charttitle object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of charttitle object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of charttitle object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TitleRequestBuilder.TitleRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..4781781d431 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/worksheet{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[WorksheetRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[WorksheetRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[WorksheetRequestBuilder.WorksheetRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_request_builder.py new file mode 100644 index 00000000000..679bf9af8d6 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/axes{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[AxesRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property axes for drives + 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] = { + "4XX": ODataError, + "5XX": 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[AxesRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartAxes] = None, request_configuration: Optional[AxesRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAxes]: + """ + Update the navigation property axes in drives + 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] = { + "4XX": ODataError, + "5XX": 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[AxesRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property axes for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[AxesRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartAxes] = None, request_configuration: Optional[AxesRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property axes in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AxesRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class AxesRequestBuilderGetQueryParameters(): + """ + Represents chart axes. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AxesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[AxesRequestBuilder.AxesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AxesRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_request_builder.py new file mode 100644 index 00000000000..8cfae5cca90 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/dataLabels{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[DataLabelsRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property dataLabels for drives + 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] = { + "4XX": ODataError, + "5XX": 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[DataLabelsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartDataLabels]: + """ + Retrieve the properties and relationships of chartdatalabels object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + Find more info here: https://learn.microsoft.com/graph/api/chartdatalabels-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartDataLabels] = None, request_configuration: Optional[DataLabelsRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartDataLabels]: + """ + Update the properties of chartdatalabels object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + Find more info here: https://learn.microsoft.com/graph/api/chartdatalabels-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] = { + "4XX": ODataError, + "5XX": 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[DataLabelsRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property dataLabels for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[DataLabelsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of chartdatalabels object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartDataLabels] = None, request_configuration: Optional[DataLabelsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of chartdatalabels object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataLabelsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class DataLabelsRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of chartdatalabels object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataLabelsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DataLabelsRequestBuilder.DataLabelsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataLabelsRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/format/format_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/format/format_request_builder.py new file mode 100644 index 00000000000..c2f5ff91415 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/format/format_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/format{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[FormatRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property format for drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartAreaFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Update the navigation property format in drives + 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] = { + "4XX": ODataError, + "5XX": 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[FormatRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property format for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[FormatRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartAreaFormat] = None, request_configuration: Optional[FormatRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property format in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties for the chart area. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[FormatRequestBuilder.FormatRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image/image_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image/image_get_response.py new file mode 100644 index 00000000000..c981ba00d64 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image/image_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image/image_request_builder.py new file mode 100644 index 00000000000..ffc902f9cac --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image/image_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/image()", path_parameters) + + async def get(self,request_configuration: Optional[ImageRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_get_response.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_get_response.py new file mode 100644 index 00000000000..81e3e0a8477 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_request_builder.py new file mode 100644 index 00000000000..4a35619f51f --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/image(width={width})", path_parameters) + + async def get(self,request_configuration: Optional[ImageWithWidthRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageWithWidthRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageWithWidthRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/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/drives/item/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..65fcbdfed46 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/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/drives/item/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..197aae92fa2 --- /dev/null +++ b/msgraph/generated/drives/item/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,91 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/drives/{drive%2Did}/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[ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/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/drives/item/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..2997b2839f9 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/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/drives/item/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..05b672eaa47 --- /dev/null +++ b/msgraph/generated/drives/item/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,93 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/drives/{drive%2Did}/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[ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py index b217c13e7a6..39ad54345e7 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py @@ -12,6 +12,19 @@ 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): """ @@ -50,6 +63,51 @@ async def get(self,request_configuration: Optional[ItemWithNameRequestBuilderGet return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + def image_with_width(self,width: Optional[int] = None) -> 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: Optional[int] = None, width: Optional[int] = None) -> 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: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> 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[ItemWithNameRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ Invoke function item @@ -76,6 +134,96 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemWithNameRequestBuilder: 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_request_builder.py new file mode 100644 index 00000000000..6a2c3dd422a --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/legend{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LegendRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property legend for drives + 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] = { + "4XX": ODataError, + "5XX": 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[LegendRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartLegend]: + """ + Retrieve the properties and relationships of chartlegend object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + Find more info here: https://learn.microsoft.com/graph/api/chartlegend-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartLegend] = None, request_configuration: Optional[LegendRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartLegend]: + """ + Update the properties of chartlegend object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + Find more info here: https://learn.microsoft.com/graph/api/chartlegend-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] = { + "4XX": ODataError, + "5XX": 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[LegendRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property legend for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[LegendRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of chartlegend object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartLegend] = None, request_configuration: Optional[LegendRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of chartlegend object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LegendRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LegendRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of chartlegend object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LegendRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LegendRequestBuilder.LegendRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LegendRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py new file mode 100644 index 00000000000..d827da1b5ea --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/series{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SeriesRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartSeriesCollectionResponse]: + """ + Retrieve a list of chartseries objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/chart-list-series?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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartSeries] = None, request_configuration: Optional[SeriesRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookChartSeries]: + """ + Use this API to create a new ChartSeries. + param body: The request body + 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/chart-post-series?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] = { + "4XX": ODataError, + "5XX": 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[SeriesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a list of chartseries objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[WorkbookChartSeries] = None, request_configuration: Optional[SeriesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Use this API to create a new ChartSeries. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Retrieve a list of chartseries objects. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SeriesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SeriesRequestBuilder.SeriesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SeriesRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_post_request_body.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_post_request_body.py new file mode 100644 index 00000000000..08581000ddb --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py new file mode 100644 index 00000000000..733d5fe8856 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py @@ -0,0 +1,92 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/setData", path_parameters) + + async def post(self,body: Optional[SetDataPostRequestBody] = None, request_configuration: Optional[SetDataRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[SetDataPostRequestBody] = None, request_configuration: Optional[SetDataRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SetDataRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_post_request_body.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_post_request_body.py new file mode 100644 index 00000000000..05a7172a850 --- /dev/null +++ b/msgraph/generated/drives/item/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: Optional[ParseNode] = None) -> 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/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py new file mode 100644 index 00000000000..d4f73963d2a --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py @@ -0,0 +1,92 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/setPosition", path_parameters) + + async def post(self,body: Optional[SetPositionPostRequestBody] = None, request_configuration: Optional[SetPositionRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[SetPositionPostRequestBody] = None, request_configuration: Optional[SetPositionRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SetPositionRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/title/title_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/title/title_request_builder.py new file mode 100644 index 00000000000..0ca7e32f887 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/title/title_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/title{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TitleRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property title for drives + 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] = { + "4XX": ODataError, + "5XX": 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[TitleRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookChartTitle]: + """ + Retrieve the properties and relationships of charttitle object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + Find more info here: https://learn.microsoft.com/graph/api/charttitle-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookChartTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookChartTitle]: + """ + Update the properties of charttitle object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + Find more info here: https://learn.microsoft.com/graph/api/charttitle-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] = { + "4XX": ODataError, + "5XX": 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[TitleRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property title for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[TitleRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of charttitle object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookChartTitle] = None, request_configuration: Optional[TitleRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of charttitle object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of charttitle object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TitleRequestBuilder.TitleRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..56cdb0090ab --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/worksheet{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[WorksheetRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[WorksheetRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[WorksheetRequestBuilder.WorksheetRequestBuilderGetQueryParameters] = None + + + 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 c13709cbb1a..c1764805e7d 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 @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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. + Retrieve the properties and relationships of range object. 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 + Find more info here: https://learn.microsoft.com/graph/api/range-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequest def to_get_request_information(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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. + Retrieve the properties and relationships of range object. 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/tables/item/columns/columns_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/columns_request_builder.py index 2efcf8274cf..c274cd5bed6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/columns_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/columns_request_builder.py @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetReque Retrieve a list of tablecolumn objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableColumnCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/table-list-columns?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/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..f3d17e2ba34 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/data_body_range/data_body_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_request_builder.py new file mode 100644 index 00000000000..a2de5e8ee4d --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/filter{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[FilterRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property filter for drives + 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] = { + "4XX": ODataError, + "5XX": 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[FilterRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookFilter] = None, request_configuration: Optional[FilterRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookFilter]: + """ + Update the navigation property filter in drives + 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] = { + "4XX": ODataError, + "5XX": 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[FilterRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property filter for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[FilterRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookFilter] = None, request_configuration: Optional[FilterRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property filter in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilterRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class FilterRequestBuilderGetQueryParameters(): + """ + Retrieve the filter applied to the column. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilterRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[FilterRequestBuilder.FilterRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class FilterRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/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..651079cd8fc --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/header_row_range/header_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py index 349cc37d695..e5e0f6e169c 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,11 @@ 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): """ @@ -76,6 +81,51 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..8d1b3021089 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[RangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/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..6ae13c6a1f2 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/total_row_range/total_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py index 5effb9b4ec0..c60121461a5 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,7 @@ 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): """ @@ -76,6 +77,15 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..1a1f54b457e --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[RangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py index 18ca1528550..d1e005d84f0 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py @@ -50,7 +50,7 @@ async def get(self,request_configuration: Optional[RowsRequestBuilderGetRequestC Retrieve a list of tablerow objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookTableRowCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/table-list-rows?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/tablerow-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py new file mode 100644 index 00000000000..9cf1311701f --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/clearFilters", path_parameters) + + async def post(self,request_configuration: Optional[ClearFiltersRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ClearFiltersRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ClearFiltersRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py new file mode 100644 index 00000000000..74d88835a08 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/columns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableColumnCollectionResponse]: + """ + Retrieve a list of tablecolumn objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumnCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/table-list-columns?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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookTableColumn] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableColumn]: + """ + Use this API to create a new TableColumn. + 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/table-post-columns?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] = { + "4XX": ODataError, + "5XX": 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[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a list of tablecolumn objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[WorkbookTableColumn] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Use this API to create a new TableColumn. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Retrieve a list of tablecolumn objects. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ColumnsRequestBuilder.ColumnsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/drives/item/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..d958930d4a4 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/convert_to_range/convert_to_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/convertToRange", path_parameters) + + async def post(self,request_configuration: Optional[ConvertToRangeRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ConvertToRangeRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ConvertToRangeRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/drives/item/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..806d0e3907a --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/data_body_range/data_body_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[DataBodyRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/drives/item/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..46bd9068fa5 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/header_row_range/header_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[HeaderRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py index 4fbba4ece70..9aebee77ab8 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py @@ -12,6 +12,17 @@ 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): """ @@ -76,6 +87,105 @@ def with_url(self,raw_url: Optional[str] = None) -> ItemAtWithIndexRequestBuilde 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) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..05df857a573 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[RangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py new file mode 100644 index 00000000000..f29eb99b2ab --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/reapplyFilters", path_parameters) + + async def post(self,request_configuration: Optional[ReapplyFiltersRequestBuilderPostRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[ReapplyFiltersRequestBuilderPostRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ReapplyFiltersRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py new file mode 100644 index 00000000000..9e6dd2b95d8 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/rows{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[RowsRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableRowCollectionResponse]: + """ + Retrieve a list of tablerow objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRowCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/tablerow-list?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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookTableRow] = None, request_configuration: Optional[RowsRequestBuilderPostRequestConfiguration] = None) -> Optional[WorkbookTableRow]: + """ + Adds rows to the end of a table. Note that this API can accept multiple rows of data. Adding one row at a time can affect performance. The recommended approach is to batch the rows together in a single call rather than inserting single rows. For best results, collect the rows to be inserted on the application side and perform a single row add operation. Experiment with the number of rows to determine the ideal number of rows to use in a single API call. This request might occasionally result in a 504 HTTP error. The appropriate response to this error is to repeat the request. + 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/table-post-rows?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] = { + "4XX": ODataError, + "5XX": 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[RowsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve a list of tablerow objects. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[WorkbookTableRow] = None, request_configuration: Optional[RowsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Adds rows to the end of a table. Note that this API can accept multiple rows of data. Adding one row at a time can affect performance. The recommended approach is to batch the rows together in a single call rather than inserting single rows. For best results, collect the rows to be inserted on the application side and perform a single row add operation. Experiment with the number of rows to determine the ideal number of rows to use in a single API call. This request might occasionally result in a 504 HTTP error. The appropriate response to this error is to repeat the request. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Retrieve a list of tablerow objects. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RowsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[RowsRequestBuilder.RowsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class RowsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py new file mode 100644 index 00000000000..be3c16e8dfe --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py @@ -0,0 +1,216 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/sort{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[SortRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property sort for drives + 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] = { + "4XX": ODataError, + "5XX": 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[SortRequestBuilderGetRequestConfiguration] = None) -> Optional[WorkbookTableSort]: + """ + Retrieve the properties and relationships of tablesort object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + Find more info here: https://learn.microsoft.com/graph/api/tablesort-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] = { + "4XX": ODataError, + "5XX": 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: Optional[WorkbookTableSort] = None, request_configuration: Optional[SortRequestBuilderPatchRequestConfiguration] = None) -> Optional[WorkbookTableSort]: + """ + Update the navigation property sort in drives + 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] = { + "4XX": ODataError, + "5XX": 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[SortRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property sort for drives + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[SortRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of tablesort object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[WorkbookTableSort] = None, request_configuration: Optional[SortRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property sort in drives + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SortRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class SortRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of tablesort object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SortRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SortRequestBuilder.SortRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SortRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/drives/item/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..b11cf8b6aca --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/total_row_range/total_row_range_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[TotalRowRangeRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..332e0b154c3 --- /dev/null +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/drives/{drive%2Did}/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/worksheet{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[WorksheetRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[WorksheetRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[WorksheetRequestBuilder.WorksheetRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/worksheets_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/worksheets_request_builder.py index 6cfbe67e7d8..7147e5f9fc2 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/worksheets_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/worksheets_request_builder.py @@ -49,7 +49,7 @@ async def get(self,request_configuration: Optional[WorksheetsRequestBuilderGetRe Retrieve a list of worksheet objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookWorksheetCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/workbook-list-worksheets?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/worksheet-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/employee_experience/employee_experience_request_builder.py b/msgraph/generated/employee_experience/employee_experience_request_builder.py index 9668906bc63..de8e6f84b05 100644 --- a/msgraph/generated/employee_experience/employee_experience_request_builder.py +++ b/msgraph/generated/employee_experience/employee_experience_request_builder.py @@ -13,6 +13,7 @@ from ..models.employee_experience import EmployeeExperience from ..models.o_data_errors.o_data_error import ODataError from .learning_course_activities.learning_course_activities_request_builder import LearningCourseActivitiesRequestBuilder + from .learning_course_activities_with_externalcourse_activity_id.learning_course_activities_with_externalcourse_activity_id_request_builder import LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder from .learning_providers.learning_providers_request_builder import LearningProvidersRequestBuilder class EmployeeExperienceRequestBuilder(BaseRequestBuilder): @@ -49,6 +50,18 @@ async def get(self,request_configuration: Optional[EmployeeExperienceRequestBuil return await self.request_adapter.send_async(request_info, EmployeeExperience, error_mapping) + def learning_course_activities_with_externalcourse_activity_id(self,externalcourse_activity_id: Optional[str] = None) -> LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder: + """ + Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperience entity. + param externalcourse_activity_id: Alternate key of learningCourseActivity + Returns: LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + """ + if not externalcourse_activity_id: + raise TypeError("externalcourse_activity_id cannot be null.") + from .learning_course_activities_with_externalcourse_activity_id.learning_course_activities_with_externalcourse_activity_id_request_builder import LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + + return LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(self.request_adapter, self.path_parameters, externalcourse_activity_id) + async def patch(self,body: Optional[EmployeeExperience] = None, request_configuration: Optional[EmployeeExperienceRequestBuilderPatchRequestConfiguration] = None) -> Optional[EmployeeExperience]: """ Update employeeExperience diff --git a/msgraph/generated/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py b/msgraph/generated/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py new file mode 100644 index 00000000000..4609cae9bc8 --- /dev/null +++ b/msgraph/generated/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...models.learning_course_activity import LearningCourseActivity + from ...models.o_data_errors.o_data_error import ODataError + +class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperience entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, externalcourse_activity_id: Optional[str] = None) -> None: + """ + Instantiates a new LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder and sets the default values. + param externalcourse_activity_id: Alternate key of learningCourseActivity + param path_parameters: The 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['externalcourseActivityId'] = str(externalcourse_activity_id) + super().__init__(request_adapter, "{+baseurl}/employeeExperience/learningCourseActivities(externalcourseActivityId='{externalcourseActivityId}'){?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property learningCourseActivities for employeeExperience + 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] = { + "4XX": ODataError, + "5XX": 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[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningCourseActivity]: + """ + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LearningCourseActivity] + Find more info here: https://learn.microsoft.com/graph/api/learningcourseactivity-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...models.learning_course_activity import LearningCourseActivity + + return await self.request_adapter.send_async(request_info, LearningCourseActivity, error_mapping) + + async def patch(self,body: Optional[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderPatchRequestConfiguration] = None) -> Optional[LearningCourseActivity]: + """ + Update the navigation property learningCourseActivities in employeeExperience + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LearningCourseActivity] + """ + 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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...models.learning_course_activity import LearningCourseActivity + + return await self.request_adapter.send_async(request_info, LearningCourseActivity, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property learningCourseActivities for employeeExperience + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property learningCourseActivities in employeeExperience + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetQueryParameters(): + """ + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_contents_with_external_id/learning_contents_with_external_id_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_contents_with_external_id/learning_contents_with_external_id_request_builder.py new file mode 100644 index 00000000000..e00d65de6db --- /dev/null +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_contents_with_external_id/learning_contents_with_external_id_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.learning_content import LearningContent + from .....models.o_data_errors.o_data_error import ODataError + +class LearningContentsWithExternalIdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the learningContents property of the microsoft.graph.learningProvider entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, external_id: Optional[str] = None) -> None: + """ + Instantiates a new LearningContentsWithExternalIdRequestBuilder and sets the default values. + param external_id: Alternate key of learningContent + param path_parameters: The 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['externalId'] = str(external_id) + super().__init__(request_adapter, "{+baseurl}/employeeExperience/learningProviders/{learningProvider%2Did}/learningContents(externalId='{externalId}'){?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LearningContentsWithExternalIdRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete the specified learningContent resource that represents the metadata of the specified provider's ingested content. + 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/learningprovider-delete-learningcontents?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] = { + "4XX": ODataError, + "5XX": 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[LearningContentsWithExternalIdRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningContent]: + """ + Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LearningContent] + Find more info here: https://learn.microsoft.com/graph/api/learningcontent-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.learning_content import LearningContent + + return await self.request_adapter.send_async(request_info, LearningContent, error_mapping) + + async def patch(self,body: Optional[LearningContent] = None, request_configuration: Optional[LearningContentsWithExternalIdRequestBuilderPatchRequestConfiguration] = None) -> Optional[LearningContent]: + """ + Update the navigation property learningContents in employeeExperience + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LearningContent] + """ + 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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.learning_content import LearningContent + + return await self.request_adapter.send_async(request_info, LearningContent, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[LearningContentsWithExternalIdRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete the specified learningContent resource that represents the metadata of the specified provider's ingested content. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[LearningContentsWithExternalIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[LearningContent] = None, request_configuration: Optional[LearningContentsWithExternalIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property learningContents in employeeExperience + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> LearningContentsWithExternalIdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LearningContentsWithExternalIdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LearningContentsWithExternalIdRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningContentsWithExternalIdRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LearningContentsWithExternalIdRequestBuilderGetQueryParameters(): + """ + Get the specified learningContent resource which represents the metadata of the specified provider's ingested content. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningContentsWithExternalIdRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LearningContentsWithExternalIdRequestBuilder.LearningContentsWithExternalIdRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningContentsWithExternalIdRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py new file mode 100644 index 00000000000..ee6db0e06da --- /dev/null +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.learning_course_activity import LearningCourseActivity + from .....models.o_data_errors.o_data_error import ODataError + +class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the learningCourseActivities property of the microsoft.graph.learningProvider entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, externalcourse_activity_id: Optional[str] = None) -> None: + """ + Instantiates a new LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder and sets the default values. + param externalcourse_activity_id: Alternate key of learningCourseActivity + param path_parameters: The 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['externalcourseActivityId'] = str(externalcourse_activity_id) + super().__init__(request_adapter, "{+baseurl}/employeeExperience/learningProviders/{learningProvider%2Did}/learningCourseActivities(externalcourseActivityId='{externalcourseActivityId}'){?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete a learningCourseActivity object using the course activity ID of either an assignment or a self-initiated activity. + 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/learningcourseactivity-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] = { + "4XX": ODataError, + "5XX": 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[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningCourseActivity]: + """ + Get learningCourseActivities from employeeExperience + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LearningCourseActivity] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.learning_course_activity import LearningCourseActivity + + return await self.request_adapter.send_async(request_info, LearningCourseActivity, error_mapping) + + async def patch(self,body: Optional[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderPatchRequestConfiguration] = None) -> Optional[LearningCourseActivity]: + """ + Update the properties of a learningCourseActivity object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LearningCourseActivity] + Find more info here: https://learn.microsoft.com/graph/api/learningcourseactivity-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.learning_course_activity import LearningCourseActivity + + return await self.request_adapter.send_async(request_info, LearningCourseActivity, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete a learningCourseActivity object using the course activity ID of either an assignment or a self-initiated activity. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get learningCourseActivities from employeeExperience + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[LearningCourseActivity] = None, request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a learningCourseActivity object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetQueryParameters(): + """ + Get learningCourseActivities from employeeExperience + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/employee_experience/learning_providers/item/learning_provider_item_request_builder.py b/msgraph/generated/employee_experience/learning_providers/item/learning_provider_item_request_builder.py index 4174bf630aa..bb1d994a28c 100644 --- a/msgraph/generated/employee_experience/learning_providers/item/learning_provider_item_request_builder.py +++ b/msgraph/generated/employee_experience/learning_providers/item/learning_provider_item_request_builder.py @@ -13,7 +13,9 @@ from ....models.learning_provider import LearningProvider from ....models.o_data_errors.o_data_error import ODataError from .learning_contents.learning_contents_request_builder import LearningContentsRequestBuilder + from .learning_contents_with_external_id.learning_contents_with_external_id_request_builder import LearningContentsWithExternalIdRequestBuilder from .learning_course_activities.learning_course_activities_request_builder import LearningCourseActivitiesRequestBuilder + from .learning_course_activities_with_externalcourse_activity_id.learning_course_activities_with_externalcourse_activity_id_request_builder import LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder class LearningProviderItemRequestBuilder(BaseRequestBuilder): """ @@ -70,6 +72,30 @@ async def get(self,request_configuration: Optional[LearningProviderItemRequestBu return await self.request_adapter.send_async(request_info, LearningProvider, error_mapping) + def learning_contents_with_external_id(self,external_id: Optional[str] = None) -> LearningContentsWithExternalIdRequestBuilder: + """ + Provides operations to manage the learningContents property of the microsoft.graph.learningProvider entity. + param external_id: Alternate key of learningContent + Returns: LearningContentsWithExternalIdRequestBuilder + """ + if not external_id: + raise TypeError("external_id cannot be null.") + from .learning_contents_with_external_id.learning_contents_with_external_id_request_builder import LearningContentsWithExternalIdRequestBuilder + + return LearningContentsWithExternalIdRequestBuilder(self.request_adapter, self.path_parameters, external_id) + + def learning_course_activities_with_externalcourse_activity_id(self,externalcourse_activity_id: Optional[str] = None) -> LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder: + """ + Provides operations to manage the learningCourseActivities property of the microsoft.graph.learningProvider entity. + param externalcourse_activity_id: Alternate key of learningCourseActivity + Returns: LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + """ + if not externalcourse_activity_id: + raise TypeError("externalcourse_activity_id cannot be null.") + from .learning_course_activities_with_externalcourse_activity_id.learning_course_activities_with_externalcourse_activity_id_request_builder import LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + + return LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(self.request_adapter, self.path_parameters, externalcourse_activity_id) + async def patch(self,body: Optional[LearningProvider] = None, request_configuration: Optional[LearningProviderItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[LearningProvider]: """ Update the properties of a learningProvider object. 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 82a58e6ba42..eaeaac93cd1 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 @@ -32,7 +32,7 @@ async def delete(self,request_configuration: Optional[ConversationItemRequestBui 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/conversation-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/group-delete-conversation?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration diff --git a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py index de4194e990e..989e357db6f 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py @@ -28,11 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/opentypeextension-post-opentypeextension?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/post-reply?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -51,7 +51,7 @@ async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/threads/item/posts/item/reply/reply_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/reply/reply_request_builder.py index 68855b63f57..542307c19dc 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/reply/reply_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/posts/item/reply/reply_request_builder.py @@ -28,11 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/opentypeextension-post-opentypeextension?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/post-reply?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -51,7 +51,7 @@ async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/threads/item/reply/reply_request_builder.py b/msgraph/generated/groups/item/conversations/item/threads/item/reply/reply_request_builder.py index 7252f47f6af..7f43f1b9a60 100644 --- a/msgraph/generated/groups/item/conversations/item/threads/item/reply/reply_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/threads/item/reply/reply_request_builder.py @@ -28,11 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. 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/post-post-attachments?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationthread-reply?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -51,7 +51,7 @@ async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. 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/group_item_request_builder.py b/msgraph/generated/groups/item/group_item_request_builder.py index d3970593344..bf9678628d7 100644 --- a/msgraph/generated/groups/item/group_item_request_builder.py +++ b/msgraph/generated/groups/item/group_item_request_builder.py @@ -113,11 +113,11 @@ async def get(self,request_configuration: Optional[GroupItemRequestBuilderGetReq async def patch(self,body: Optional[Group] = None, request_configuration: Optional[GroupItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[Group]: """ - Add a member to a security or Microsoft 365 group through the members navigation property. The following table shows the types of members that can be added to either security groups or Microsoft 365 groups. + Update the properties of a group object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Group] - Find more info here: https://learn.microsoft.com/graph/api/group-post-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/group-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -171,7 +171,7 @@ def to_get_request_information(self,request_configuration: Optional[GroupItemReq def to_patch_request_information(self,body: Optional[Group] = None, request_configuration: Optional[GroupItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Add a member to a security or Microsoft 365 group through the members navigation property. The following table shows the types of members that can be added to either security groups or Microsoft 365 groups. + Update the properties of a group object. 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/sites/item/get_by_path_with_path/analytics/analytics_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/analytics/analytics_request_builder.py new file mode 100644 index 00000000000..da98b3697e9 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/analytics/analytics_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/analytics{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property analytics for groups + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Analytics about the view activities that took place in this site. + 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] = { + "4XX": ODataError, + "5XX": 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: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Update the navigation property analytics in groups + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property analytics for groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Analytics about the view activities that took place in this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property analytics in groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class AnalyticsRequestBuilderGetQueryParameters(): + """ + Analytics about the view activities that took place in this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[AnalyticsRequestBuilder.AnalyticsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/columns/columns_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/columns/columns_request_builder.py new file mode 100644 index 00000000000..b3f38508d0d --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/columns/columns_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/columns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinitionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-columns?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + Find more info here: https://learn.microsoft.com/graph/api/site-post-columns?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] = { + "4XX": ODataError, + "5XX": 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[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ColumnsRequestBuilder.ColumnsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py new file mode 100644 index 00000000000..9bbba0577d3 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ContentTypesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentTypes property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/contentTypes{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentTypeCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: + """ + Create a new [contentType][] in a [site][]. + 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/site-post-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [contentType][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ContentTypesRequestBuilderGetQueryParameters(): + """ + Get the collection of [contentType][contentType] resources in a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ContentTypesRequestBuilder.ContentTypesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/created_by_user/created_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..74f9b944f03 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/created_by_user/created_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.user import User + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/createdByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[CreatedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[CreatedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[CreatedByUserRequestBuilder.CreatedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/drive/drive_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/drive/drive_request_builder.py new file mode 100644 index 00000000000..7eb9f43ee22 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/drive/drive_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/drive{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: + """ + The default drive (document library) for this site. + 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] = { + "4XX": ODataError, + "5XX": 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[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The default drive (document library) for this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + The default drive (document library) for this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DriveRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DriveRequestBuilder.DriveRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/drives/drives_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/drives/drives_request_builder.py new file mode 100644 index 00000000000..c6bdddacc95 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/drives/drives_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.drive_collection_response import DriveCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + +class DrivesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new DrivesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/drives{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveCollectionResponse]: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_collection_response import DriveCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> DrivesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DrivesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DrivesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DrivesRequestBuilderGetQueryParameters(): + """ + The collection of drives (document libraries) under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DrivesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DrivesRequestBuilder.DrivesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/external_columns/external_columns_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/external_columns/external_columns_request_builder.py new file mode 100644 index 00000000000..878d7058bd1 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/external_columns/external_columns_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.column_definition_collection_response import ColumnDefinitionCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + +class ExternalColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ExternalColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/externalColumns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get externalColumns from groups + 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] = { + "4XX": ODataError, + "5XX": 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[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get externalColumns from groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ExternalColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ExternalColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ExternalColumnsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ExternalColumnsRequestBuilderGetQueryParameters(): + """ + Get externalColumns from groups + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ExternalColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ExternalColumnsRequestBuilder.ExternalColumnsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_get_response.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_get_response.py new file mode 100644 index 00000000000..c0732961acf --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/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: Optional[ParseNode] = None) -> 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/groups/item/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py new file mode 100644 index 00000000000..6f66a89cbc7 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -0,0 +1,141 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 == "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 + + # 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetActivitiesByIntervalRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[GetActivitiesByIntervalRequestBuilder.GetActivitiesByIntervalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/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/groups/item/sites/item/get_by_path_with_path/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..0749a77a29a --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/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: Optional[ParseNode] = None) -> 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/groups/item/sites/item/get_by_path_with_path/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/groups/item/sites/item/get_by_path_with_path/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..35eb03005a6 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/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,148 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getActivitiesByInterval(startDateTime='{startDateTime}',endDateTime='{endDateTime}',interval='{interval}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 == "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 + + # 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py new file mode 100644 index 00000000000..4fd4dfde2dd --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_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 GetApplicableContentTypesForListWithListIdGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ContentType]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetApplicableContentTypesForListWithListIdGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetApplicableContentTypesForListWithListIdGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetApplicableContentTypesForListWithListIdGetResponse() + + def 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/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py new file mode 100644 index 00000000000..09ff8da4807 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py @@ -0,0 +1,144 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse + +class GetApplicableContentTypesForListWithListIdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getApplicableContentTypesForList method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, list_id: Optional[str] = None) -> None: + """ + Instantiates a new GetApplicableContentTypesForListWithListIdRequestBuilder and sets the default values. + param list_id: Usage: listId='{listId}' + param path_parameters: The 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['listId'] = str(list_id) + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getApplicableContentTypesForList(listId='{listId}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> Optional[GetApplicableContentTypesForListWithListIdGetResponse]: + """ + Invoke function getApplicableContentTypesForList + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GetApplicableContentTypesForListWithListIdGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse + + return await self.request_adapter.send_async(request_info, GetApplicableContentTypesForListWithListIdGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Invoke function getApplicableContentTypesForList + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> GetApplicableContentTypesForListWithListIdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetApplicableContentTypesForListWithListIdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetApplicableContentTypesForListWithListIdRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GetApplicableContentTypesForListWithListIdRequestBuilderGetQueryParameters(): + """ + Invoke function getApplicableContentTypesForList + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 == "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 + + # 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[GetApplicableContentTypesForListWithListIdRequestBuilder.GetApplicableContentTypesForListWithListIdRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_request_builder.py new file mode 100644 index 00000000000..0190e9b4eec --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/analytics{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property analytics for groups + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Analytics about the view activities that took place in this site. + 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] = { + "4XX": ODataError, + "5XX": 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: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Update the navigation property analytics in groups + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property analytics for groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Analytics about the view activities that took place in this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property analytics in groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class AnalyticsRequestBuilderGetQueryParameters(): + """ + Analytics about the view activities that took place in this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[AnalyticsRequestBuilder.AnalyticsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py new file mode 100644 index 00000000000..f420375517b --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/columns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinitionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-columns?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + Find more info here: https://learn.microsoft.com/graph/api/site-post-columns?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] = { + "4XX": ODataError, + "5XX": 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[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ColumnsRequestBuilder.ColumnsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py new file mode 100644 index 00000000000..757ecb88e20 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ContentTypesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentTypes property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/contentTypes{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentTypeCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: + """ + Create a new [contentType][] in a [site][]. + 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/site-post-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [contentType][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ContentTypesRequestBuilderGetQueryParameters(): + """ + Get the collection of [contentType][contentType] resources in a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ContentTypesRequestBuilder.ContentTypesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..bd7d7365e8d --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.user import User + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/createdByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[CreatedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[CreatedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[CreatedByUserRequestBuilder.CreatedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_request_builder.py new file mode 100644 index 00000000000..f59eca9fca0 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/drive{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: + """ + The default drive (document library) for this site. + 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] = { + "4XX": ODataError, + "5XX": 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[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The default drive (document library) for this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + The default drive (document library) for this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DriveRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DriveRequestBuilder.DriveRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_request_builder.py new file mode 100644 index 00000000000..1ef96e6a680 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.drive_collection_response import DriveCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + +class DrivesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new DrivesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/drives{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveCollectionResponse]: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive_collection_response import DriveCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> DrivesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DrivesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DrivesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DrivesRequestBuilderGetQueryParameters(): + """ + The collection of drives (document libraries) under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DrivesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DrivesRequestBuilder.DrivesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_request_builder.py new file mode 100644 index 00000000000..9c6c9efec29 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.column_definition_collection_response import ColumnDefinitionCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + +class ExternalColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ExternalColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/externalColumns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get externalColumns from groups + 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] = { + "4XX": ODataError, + "5XX": 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[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get externalColumns from groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ExternalColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ExternalColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ExternalColumnsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ExternalColumnsRequestBuilderGetQueryParameters(): + """ + Get externalColumns from groups + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ExternalColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ExternalColumnsRequestBuilder.ExternalColumnsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py new file mode 100644 index 00000000000..4b560f02937 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py @@ -0,0 +1,249 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.site import Site + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + 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 .drives.drives_request_builder import DrivesRequestBuilder + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + from .items.items_request_builder import ItemsRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .lists.lists_request_builder import ListsRequestBuilder + from .onenote.onenote_request_builder import OnenoteRequestBuilder + from .operations.operations_request_builder import OperationsRequestBuilder + from .permissions.permissions_request_builder import PermissionsRequestBuilder + from .sites.sites_request_builder import SitesRequestBuilder + from .term_store.term_store_request_builder import TermStoreRequestBuilder + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder + +class GetByPathWithPath1RequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getByPath method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, path1: Optional[str] = None) -> None: + """ + Instantiates a new GetByPathWithPath1RequestBuilder and sets the default values. + param path1: Usage: path='{path1}' + param path_parameters: The 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['path1'] = str(path1) + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')", path_parameters) + + async def get(self,request_configuration: Optional[GetByPathWithPath1RequestBuilderGetRequestConfiguration] = None) -> Optional[Site]: + """ + Invoke function getByPath + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Site] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.site import Site + + return await self.request_adapter.send_async(request_info, Site, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GetByPathWithPath1RequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Invoke function getByPath + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> GetByPathWithPath1RequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetByPathWithPath1RequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetByPathWithPath1RequestBuilder(self.request_adapter, raw_url) + + @property + def analytics(self) -> AnalyticsRequestBuilder: + """ + Provides operations to manage the analytics property of the microsoft.graph.site entity. + """ + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + + return AnalyticsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.site 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.site 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.site entity. + """ + from .drive.drive_request_builder import DriveRequestBuilder + + return DriveRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def drives(self) -> DrivesRequestBuilder: + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + from .drives.drives_request_builder import DrivesRequestBuilder + + return DrivesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def external_columns(self) -> ExternalColumnsRequestBuilder: + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + + return ExternalColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def items(self) -> ItemsRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.site 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 lists(self) -> ListsRequestBuilder: + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + from .lists.lists_request_builder import ListsRequestBuilder + + return ListsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def onenote(self) -> OnenoteRequestBuilder: + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + from .onenote.onenote_request_builder import OnenoteRequestBuilder + + return OnenoteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def operations(self) -> OperationsRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + from .operations.operations_request_builder import OperationsRequestBuilder + + return OperationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permissions(self) -> PermissionsRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + from .permissions.permissions_request_builder import PermissionsRequestBuilder + + return PermissionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sites(self) -> SitesRequestBuilder: + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + from .sites.sites_request_builder import SitesRequestBuilder + + return SitesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_store(self) -> TermStoreRequestBuilder: + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + from .term_store.term_store_request_builder import TermStoreRequestBuilder + + return TermStoreRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_stores(self) -> TermStoresRequestBuilder: + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder + + return TermStoresRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetByPathWithPath1RequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_request_builder.py new file mode 100644 index 00000000000..5ea6ce8c009 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.base_item_collection_response import BaseItemCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + +class ItemsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/items{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[BaseItemCollectionResponse]: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[BaseItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.base_item_collection_response import BaseItemCollectionResponse + + return await self.request_adapter.send_async(request_info, BaseItemCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ItemsRequestBuilderGetQueryParameters(): + """ + Used to address any item contained in this site. This collection can't be enumerated. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ItemsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..8d762bb37b2 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.user import User + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/lastModifiedByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LastModifiedByUserRequestBuilder.LastModifiedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py new file mode 100644 index 00000000000..aa1288fcb14 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.list_ import List_ + from ........models.list_collection_response import ListCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + +class ListsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ListsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/lists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListCollectionResponse]: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/list-list?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.list_collection_response import ListCollectionResponse + + return await self.request_adapter.send_async(request_info, ListCollectionResponse, error_mapping) + + async def post(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> Optional[List_]: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[List_] + Find more info here: https://learn.microsoft.com/graph/api/list-create?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] = { + "4XX": ODataError, + "5XX": 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_get_request_information(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ListsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ListsRequestBuilderGetQueryParameters(): + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ListsRequestBuilder.ListsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_request_builder.py new file mode 100644 index 00000000000..317190f7830 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.onenote import Onenote + from ........models.o_data_errors.o_data_error import ODataError + +class OnenoteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new OnenoteRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/onenote{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property onenote for groups + 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] = { + "4XX": ODataError, + "5XX": 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[OnenoteRequestBuilderGetRequestConfiguration] = None) -> Optional[Onenote]: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + async def patch(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> Optional[Onenote]: + """ + Update the navigation property onenote in groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + 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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property onenote for groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property onenote in groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> OnenoteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OnenoteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OnenoteRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class OnenoteRequestBuilderGetQueryParameters(): + """ + Calls the OneNote service for notebook related operations. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OnenoteRequestBuilder.OnenoteRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py new file mode 100644 index 00000000000..13a3976c84b --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py @@ -0,0 +1,202 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class OperationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperationCollectionResponse]: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperationCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-operations?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] = { + "4XX": ODataError, + "5XX": 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: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> Optional[RichLongRunningOperation]: + """ + Create new navigation property to operations for groups + 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] = { + "4XX": ODataError, + "5XX": 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[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to operations for groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get a list of rich long-running operations associated with a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OperationsRequestBuilder.OperationsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py new file mode 100644 index 00000000000..3ad1cfacc31 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class PermissionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/permissions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionCollectionResponse]: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PermissionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-permissions?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] = { + "4XX": ODataError, + "5XX": 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: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Permission]: + """ + Create a new permission object on a site. + 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/site-post-permissions?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] = { + "4XX": ODataError, + "5XX": 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[PermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new permission object on a site. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class PermissionsRequestBuilderGetQueryParameters(): + """ + Get the permission resources from the permissions navigation property on a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[PermissionsRequestBuilder.PermissionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py new file mode 100644 index 00000000000..a2fd5ed3c66 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py @@ -0,0 +1,147 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.site_collection_response import SiteCollectionResponse + +class SitesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SitesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/sites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: + """ + Get a collection of subsites defined for a [site][]. + 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-subsites?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.site_collection_response import SiteCollectionResponse + + return await self.request_adapter.send_async(request_info, SiteCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a collection of subsites defined for a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> SitesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SitesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SitesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SitesRequestBuilderGetQueryParameters(): + """ + Get a collection of subsites defined for a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SitesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SitesRequestBuilder.SitesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_request_builder.py new file mode 100644 index 00000000000..1778c74b093 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.term_store.store import Store + +class TermStoreRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoreRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/termStore{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property termStore for groups + 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] = { + "4XX": ODataError, + "5XX": 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[TermStoreRequestBuilderGetRequestConfiguration] = None) -> Optional[Store]: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + async def patch(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> Optional[Store]: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property termStore for groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoreRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoreRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoreRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TermStoreRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a store object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoreRequestBuilder.TermStoreRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py new file mode 100644 index 00000000000..b6935f77094 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py @@ -0,0 +1,201 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.term_store.store import Store + from ........models.term_store.store_collection_response import StoreCollectionResponse + +class TermStoresRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoresRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/termStores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> Optional[StoreCollectionResponse]: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[StoreCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.term_store.store_collection_response import StoreCollectionResponse + + return await self.request_adapter.send_async(request_info, StoreCollectionResponse, error_mapping) + + async def post(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> Optional[Store]: + """ + Create new navigation property to termStores for groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to termStores for groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoresRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoresRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoresRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TermStoresRequestBuilderGetQueryParameters(): + """ + The collection of termStores under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoresRequestBuilder.TermStoresRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py index 7050fdcb47a..0697a8d0706 100644 --- a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py @@ -12,6 +12,26 @@ if TYPE_CHECKING: from ......models.o_data_errors.o_data_error import ODataError from ......models.site import Site + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + 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 .drives.drives_request_builder import DrivesRequestBuilder + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + 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 .get_applicable_content_types_for_list_with_list_id.get_applicable_content_types_for_list_with_list_id_request_builder import GetApplicableContentTypesForListWithListIdRequestBuilder + from .get_by_path_with_path1.get_by_path_with_path1_request_builder import GetByPathWithPath1RequestBuilder + from .items.items_request_builder import ItemsRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .lists.lists_request_builder import ListsRequestBuilder + from .onenote.onenote_request_builder import OnenoteRequestBuilder + from .operations.operations_request_builder import OperationsRequestBuilder + from .permissions.permissions_request_builder import PermissionsRequestBuilder + from .sites.sites_request_builder import SitesRequestBuilder + from .term_store.term_store_request_builder import TermStoreRequestBuilder + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder class GetByPathWithPathRequestBuilder(BaseRequestBuilder): """ @@ -50,6 +70,48 @@ async def get(self,request_configuration: Optional[GetByPathWithPathRequestBuild return await self.request_adapter.send_async(request_info, Site, error_mapping) + def get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval(self,end_date_time: Optional[str] = None, interval: Optional[str] = None, start_date_time: Optional[str] = None) -> 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) + + def get_applicable_content_types_for_list_with_list_id(self,list_id: Optional[str] = None) -> GetApplicableContentTypesForListWithListIdRequestBuilder: + """ + Provides operations to call the getApplicableContentTypesForList method. + param list_id: Usage: listId='{listId}' + Returns: GetApplicableContentTypesForListWithListIdRequestBuilder + """ + if not list_id: + raise TypeError("list_id cannot be null.") + from .get_applicable_content_types_for_list_with_list_id.get_applicable_content_types_for_list_with_list_id_request_builder import GetApplicableContentTypesForListWithListIdRequestBuilder + + return GetApplicableContentTypesForListWithListIdRequestBuilder(self.request_adapter, self.path_parameters, list_id) + + def get_by_path_with_path1(self,path1: Optional[str] = None) -> GetByPathWithPath1RequestBuilder: + """ + Provides operations to call the getByPath method. + param path1: Usage: path='{path1}' + Returns: GetByPathWithPath1RequestBuilder + """ + if not path1: + raise TypeError("path1 cannot be null.") + from .get_by_path_with_path1.get_by_path_with_path1_request_builder import GetByPathWithPath1RequestBuilder + + return GetByPathWithPath1RequestBuilder(self.request_adapter, self.path_parameters, path1) + def to_get_request_information(self,request_configuration: Optional[GetByPathWithPathRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ Invoke function getByPath @@ -76,6 +138,159 @@ def with_url(self,raw_url: Optional[str] = None) -> GetByPathWithPathRequestBuil raise TypeError("raw_url cannot be null.") return GetByPathWithPathRequestBuilder(self.request_adapter, raw_url) + @property + def analytics(self) -> AnalyticsRequestBuilder: + """ + Provides operations to manage the analytics property of the microsoft.graph.site entity. + """ + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + + return AnalyticsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.site 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.site 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.site entity. + """ + from .drive.drive_request_builder import DriveRequestBuilder + + return DriveRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def drives(self) -> DrivesRequestBuilder: + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + from .drives.drives_request_builder import DrivesRequestBuilder + + return DrivesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def external_columns(self) -> ExternalColumnsRequestBuilder: + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + + return ExternalColumnsRequestBuilder(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 items(self) -> ItemsRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.site 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 lists(self) -> ListsRequestBuilder: + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + from .lists.lists_request_builder import ListsRequestBuilder + + return ListsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def onenote(self) -> OnenoteRequestBuilder: + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + from .onenote.onenote_request_builder import OnenoteRequestBuilder + + return OnenoteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def operations(self) -> OperationsRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + from .operations.operations_request_builder import OperationsRequestBuilder + + return OperationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permissions(self) -> PermissionsRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + from .permissions.permissions_request_builder import PermissionsRequestBuilder + + return PermissionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sites(self) -> SitesRequestBuilder: + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + from .sites.sites_request_builder import SitesRequestBuilder + + return SitesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_store(self) -> TermStoreRequestBuilder: + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + from .term_store.term_store_request_builder import TermStoreRequestBuilder + + return TermStoreRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_stores(self) -> TermStoresRequestBuilder: + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder + + return TermStoresRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/items/items_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/items/items_request_builder.py new file mode 100644 index 00000000000..7a979c22856 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/items/items_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.base_item_collection_response import BaseItemCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + +class ItemsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/items{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[BaseItemCollectionResponse]: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[BaseItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.base_item_collection_response import BaseItemCollectionResponse + + return await self.request_adapter.send_async(request_info, BaseItemCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ItemsRequestBuilderGetQueryParameters(): + """ + Used to address any item contained in this site. This collection can't be enumerated. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ItemsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..0247df18b93 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.user import User + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/lastModifiedByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LastModifiedByUserRequestBuilder.LastModifiedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/lists/lists_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/lists/lists_request_builder.py new file mode 100644 index 00000000000..23baccc43e0 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/lists/lists_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.list_ import List_ + from .......models.list_collection_response import ListCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + +class ListsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ListsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/lists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListCollectionResponse]: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/list-list?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.list_collection_response import ListCollectionResponse + + return await self.request_adapter.send_async(request_info, ListCollectionResponse, error_mapping) + + async def post(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> Optional[List_]: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[List_] + Find more info here: https://learn.microsoft.com/graph/api/list-create?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] = { + "4XX": ODataError, + "5XX": 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_get_request_information(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ListsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ListsRequestBuilderGetQueryParameters(): + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ListsRequestBuilder.ListsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/onenote/onenote_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/onenote/onenote_request_builder.py new file mode 100644 index 00000000000..2040bfc25a4 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/onenote/onenote_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.onenote import Onenote + from .......models.o_data_errors.o_data_error import ODataError + +class OnenoteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new OnenoteRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/onenote{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property onenote for groups + 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] = { + "4XX": ODataError, + "5XX": 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[OnenoteRequestBuilderGetRequestConfiguration] = None) -> Optional[Onenote]: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + async def patch(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> Optional[Onenote]: + """ + Update the navigation property onenote in groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + 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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property onenote for groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property onenote in groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> OnenoteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OnenoteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OnenoteRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class OnenoteRequestBuilderGetQueryParameters(): + """ + Calls the OneNote service for notebook related operations. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OnenoteRequestBuilder.OnenoteRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/operations/operations_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/operations/operations_request_builder.py new file mode 100644 index 00000000000..b7da7134ea6 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/operations/operations_request_builder.py @@ -0,0 +1,202 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class OperationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperationCollectionResponse]: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperationCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-operations?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] = { + "4XX": ODataError, + "5XX": 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: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> Optional[RichLongRunningOperation]: + """ + Create new navigation property to operations for groups + 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] = { + "4XX": ODataError, + "5XX": 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[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to operations for groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get a list of rich long-running operations associated with a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OperationsRequestBuilder.OperationsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py new file mode 100644 index 00000000000..3a83381dd5b --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class PermissionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/permissions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionCollectionResponse]: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PermissionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-permissions?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] = { + "4XX": ODataError, + "5XX": 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: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Permission]: + """ + Create a new permission object on a site. + 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/site-post-permissions?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] = { + "4XX": ODataError, + "5XX": 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[PermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new permission object on a site. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class PermissionsRequestBuilderGetQueryParameters(): + """ + Get the permission resources from the permissions navigation property on a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[PermissionsRequestBuilder.PermissionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/sites/sites_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/sites/sites_request_builder.py new file mode 100644 index 00000000000..9c3ce4741e6 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/sites/sites_request_builder.py @@ -0,0 +1,147 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.site_collection_response import SiteCollectionResponse + +class SitesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SitesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/sites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: + """ + Get a collection of subsites defined for a [site][]. + 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-subsites?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.site_collection_response import SiteCollectionResponse + + return await self.request_adapter.send_async(request_info, SiteCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a collection of subsites defined for a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> SitesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SitesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SitesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SitesRequestBuilderGetQueryParameters(): + """ + Get a collection of subsites defined for a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SitesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SitesRequestBuilder.SitesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_store/term_store_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_store/term_store_request_builder.py new file mode 100644 index 00000000000..9f5e9b991e1 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_store/term_store_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.term_store.store import Store + +class TermStoreRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoreRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/termStore{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property termStore for groups + 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] = { + "4XX": ODataError, + "5XX": 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[TermStoreRequestBuilderGetRequestConfiguration] = None) -> Optional[Store]: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + async def patch(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> Optional[Store]: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property termStore for groups + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoreRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoreRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoreRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TermStoreRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a store object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoreRequestBuilder.TermStoreRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py new file mode 100644 index 00000000000..96ba5b0c756 --- /dev/null +++ b/msgraph/generated/groups/item/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py @@ -0,0 +1,201 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.term_store.store import Store + from .......models.term_store.store_collection_response import StoreCollectionResponse + +class TermStoresRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoresRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/groups/{group%2Did}/sites/{site%2Did}/getByPath(path='{path}')/termStores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> Optional[StoreCollectionResponse]: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[StoreCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.term_store.store_collection_response import StoreCollectionResponse + + return await self.request_adapter.send_async(request_info, StoreCollectionResponse, error_mapping) + + async def post(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> Optional[Store]: + """ + Create new navigation property to termStores for groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to termStores for groups + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoresRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoresRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoresRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TermStoresRequestBuilderGetQueryParameters(): + """ + The collection of termStores under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoresRequestBuilder.TermStoresRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/groups/item/sites/item/lists/item/list_item_request_builder.py b/msgraph/generated/groups/item/sites/item/lists/item/list_item_request_builder.py index 2cdc11204a2..2291c5357cc 100644 --- a/msgraph/generated/groups/item/sites/item/lists/item/list_item_request_builder.py +++ b/msgraph/generated/groups/item/sites/item/lists/item/list_item_request_builder.py @@ -55,10 +55,10 @@ async def delete(self,request_configuration: Optional[ListItemRequestBuilderDele async def get(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> Optional[List_]: """ - Get a list of rich long-running operations associated with a list. + Returns the metadata for a [list][]. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[List_] - Find more info here: https://learn.microsoft.com/graph/api/list-list-operations?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/list-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -117,7 +117,7 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemR def to_get_request_information(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of rich long-running operations associated with a list. + Returns the metadata for a [list][]. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -247,7 +247,7 @@ class ListItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ListItemRequestBuilderGetQueryParameters(): """ - Get a list of rich long-running operations associated with a list. + Returns the metadata for a [list][]. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/team/channels/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/groups/item/team/channels/item/members/item/conversation_member_item_request_builder.py index 6810577c3a9..99948e11ce7 100644 --- a/msgraph/generated/groups/item/team/channels/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/members/item/conversation_member_item_request_builder.py @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 """ diff --git a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/replies_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/replies_request_builder.py index 2bac38a6542..670d1934cde 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/groups/item/team/channels/item/messages/messages_request_builder.py b/msgraph/generated/groups/item/team/channels/item/messages/messages_request_builder.py index a33727909a3..0237531071b 100644 --- a/msgraph/generated/groups/item/team/channels/item/messages/messages_request_builder.py +++ b/msgraph/generated/groups/item/team/channels/item/messages/messages_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified channel. 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/channel-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified 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/groups/item/team/primary_channel/members/item/conversation_member_item_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/members/item/conversation_member_item_request_builder.py index 1a7d4d07b1b..85add4f7a14 100644 --- a/msgraph/generated/groups/item/team/primary_channel/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/members/item/conversation_member_item_request_builder.py @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 """ diff --git a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/replies_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/replies_request_builder.py index 73a4663b1bb..3e3590dfa80 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/groups/item/team/primary_channel/messages/messages_request_builder.py b/msgraph/generated/groups/item/team/primary_channel/messages/messages_request_builder.py index 8d847180d1a..61179307ab8 100644 --- a/msgraph/generated/groups/item/team/primary_channel/messages/messages_request_builder.py +++ b/msgraph/generated/groups/item/team/primary_channel/messages/messages_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified channel. 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/channel-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified 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/groups/item/team/schedule/share/share_request_builder.py b/msgraph/generated/groups/item/team/schedule/share/share_request_builder.py index a7a8281536f..0a5360bc599 100644 --- a/msgraph/generated/groups/item/team/schedule/share/share_request_builder.py +++ b/msgraph/generated/groups/item/team/schedule/share/share_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SharePostRequestBody] = None, request_configuration: Optional[ShareRequestBuilderPostRequestConfiguration] = None) -> None: """ - Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. + Share a schedule time range with schedule members. This action makes the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers. Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -51,7 +51,7 @@ async def post(self,body: Optional[SharePostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[SharePostRequestBody] = None, request_configuration: Optional[ShareRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. + Share a schedule time range with schedule members. This action makes the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers. Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. 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/threads/item/conversation_thread_item_request_builder.py b/msgraph/generated/groups/item/threads/item/conversation_thread_item_request_builder.py index 8bdb85f7274..6cb1382718e 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 @@ -33,7 +33,7 @@ async def delete(self,request_configuration: Optional[ConversationThreadItemRequ 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 @@ -50,10 +50,10 @@ async def delete(self,request_configuration: Optional[ConversationThreadItemRequ async def get(self,request_configuration: Optional[ConversationThreadItemRequestBuilderGetRequestConfiguration] = 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 @@ -113,7 +113,7 @@ def to_delete_request_information(self,request_configuration: Optional[Conversat def to_get_request_information(self,request_configuration: Optional[ConversationThreadItemRequestBuilderGetRequestConfiguration] = 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 """ @@ -189,7 +189,7 @@ class ConversationThreadItemRequestBuilderDeleteRequestConfiguration(BaseRequest @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: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py index 23dc3cca6a9..dffd31ac113 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/in_reply_to/reply/reply_request_builder.py @@ -28,11 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/opentypeextension-post-opentypeextension?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/post-reply?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -51,7 +51,7 @@ async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/threads/item/posts/item/reply/reply_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/item/reply/reply_request_builder.py index 3739cfb06c4..9774fefb031 100644 --- a/msgraph/generated/groups/item/threads/item/posts/item/reply/reply_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/item/reply/reply_request_builder.py @@ -28,11 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/opentypeextension-post-opentypeextension?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/post-reply?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -51,7 +51,7 @@ async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - 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. + Reply to a post and add a new post to the specified thread in a group conversation. You can specify both the parent conversation and thread in the request, or, you can specify just the parent thread without the parent conversation. 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/threads/item/reply/reply_request_builder.py b/msgraph/generated/groups/item/threads/item/reply/reply_request_builder.py index 977153af4e8..2ccaddb1eda 100644 --- a/msgraph/generated/groups/item/threads/item/reply/reply_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/reply/reply_request_builder.py @@ -28,11 +28,11 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> None: """ - Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. 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/post-post-attachments?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationthread-reply?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -51,7 +51,7 @@ async def post(self,body: Optional[ReplyPostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[ReplyPostRequestBody] = None, request_configuration: Optional[ReplyRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Add an attachment when creating a group post. This operation limits the size of the attachment you can add to under 3 MB. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Reply to a thread in a group conversation and add a new post to it. You can specify the parent conversation in the request, or, you can specify just the thread without the parent conversation. 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/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 30d286417bd..a95bfd8cc44 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 @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[NamedLocationItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[NamedLocation] = None, request_configuration def to_delete_request_information(self,request_configuration: Optional[NamedLocationItemRequestBuilderDeleteRequestConfiguration] = 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 """ 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 7dc77d6714b..cca361ab8d6 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 @@ -55,10 +55,10 @@ async def delete(self,request_configuration: Optional[AccessPackageItemRequestBu async def get(self,request_configuration: Optional[AccessPackageItemRequestBuilderGetRequestConfiguration] = 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 @@ -118,7 +118,7 @@ def to_delete_request_information(self,request_configuration: Optional[AccessPac def to_get_request_information(self,request_configuration: Optional[AccessPackageItemRequestBuilderGetRequestConfiguration] = 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 """ @@ -239,7 +239,7 @@ class AccessPackageItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfi @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: Optional[str] = None) -> 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 5c4aaf7b3d2..1b4c2e11a7c 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 @@ -48,10 +48,10 @@ async def delete(self,request_configuration: Optional[CustomCalloutExtensionItem async def get(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomCalloutExtension]: """ - Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentWorkflowExtension 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/accesspackageassignmentrequestworkflowextension-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentworkflowextension-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[CustomCalloutExtensionItemReq async def patch(self,body: Optional[CustomCalloutExtension] = None, request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration] = 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.") @@ -111,7 +111,7 @@ def to_delete_request_information(self,request_configuration: Optional[CustomCal def to_get_request_information(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -128,7 +128,7 @@ def to_get_request_information(self,request_configuration: Optional[CustomCallou def to_patch_request_information(self,body: Optional[CustomCalloutExtension] = None, request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration] = 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 @@ -169,7 +169,7 @@ class CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class CustomCalloutExtensionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py index 91840c25c4d..0a6af154bfa 100644 --- a/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/resource_requests/item/catalog/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py @@ -48,10 +48,10 @@ async def delete(self,request_configuration: Optional[CustomCalloutExtensionItem async def get(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> Optional[CustomCalloutExtension]: """ - Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentWorkflowExtension 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/accesspackageassignmentrequestworkflowextension-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentworkflowextension-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[CustomCalloutExtensionItemReq async def patch(self,body: Optional[CustomCalloutExtension] = None, request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration] = 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.") @@ -111,7 +111,7 @@ def to_delete_request_information(self,request_configuration: Optional[CustomCal def to_get_request_information(self,request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -128,7 +128,7 @@ def to_get_request_information(self,request_configuration: Optional[CustomCallou def to_patch_request_information(self,body: Optional[CustomCalloutExtension] = None, request_configuration: Optional[CustomCalloutExtensionItemRequestBuilderPatchRequestConfiguration] = 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 @@ -169,7 +169,7 @@ class CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration(BaseReq @dataclass class CustomCalloutExtensionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_governance/terms_of_use/agreements/item/agreement_item_request_builder.py b/msgraph/generated/identity_governance/terms_of_use/agreements/item/agreement_item_request_builder.py index 83ec0c9e973..f1603def290 100644 --- a/msgraph/generated/identity_governance/terms_of_use/agreements/item/agreement_item_request_builder.py +++ b/msgraph/generated/identity_governance/terms_of_use/agreements/item/agreement_item_request_builder.py @@ -51,10 +51,10 @@ async def delete(self,request_configuration: Optional[AgreementItemRequestBuilde async def get(self,request_configuration: Optional[AgreementItemRequestBuilderGetRequestConfiguration] = None) -> Optional[Agreement]: """ - Retrieve all files related to an agreement. This includes the default file and all localized files. + Retrieve the properties and relationships of an agreement object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Agreement] - Find more info here: https://learn.microsoft.com/graph/api/agreement-list-files?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/agreement-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[Agreement def to_get_request_information(self,request_configuration: Optional[AgreementItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve all files related to an agreement. This includes the default file and all localized files. + Retrieve the properties and relationships of an agreement object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -199,7 +199,7 @@ class AgreementItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfigura @dataclass class AgreementItemRequestBuilderGetQueryParameters(): """ - Retrieve all files related to an agreement. This includes the default file and all localized files. + Retrieve the properties and relationships of an agreement object. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/identity_protection/risky_users/item/history/history_request_builder.py b/msgraph/generated/identity_protection/risky_users/item/history/history_request_builder.py index a3c56226401..56f085e7b49 100644 --- a/msgraph/generated/identity_protection/risky_users/item/history/history_request_builder.py +++ b/msgraph/generated/identity_protection/risky_users/item/history/history_request_builder.py @@ -45,10 +45,10 @@ def by_risky_user_history_item_id(self,risky_user_history_item_id: str) -> Risky async def get(self,request_configuration: Optional[HistoryRequestBuilderGetRequestConfiguration] = None) -> Optional[RiskyUserHistoryItemCollectionResponse]: """ - Read the properties and relationships of a riskyUserHistoryItem object. + Get the riskyUserHistoryItems from the history navigation property. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RiskyUserHistoryItemCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/riskyuser-get-riskyuserhistoryitem?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/riskyuser-list-history?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -91,7 +91,7 @@ async def post(self,body: Optional[RiskyUserHistoryItem] = None, request_configu def to_get_request_information(self,request_configuration: Optional[HistoryRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Read the properties and relationships of a riskyUserHistoryItem object. + Get the riskyUserHistoryItems from the history navigation property. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -148,7 +148,7 @@ def count(self) -> CountRequestBuilder: @dataclass class HistoryRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of a riskyUserHistoryItem object. + Get the riskyUserHistoryItems from the history navigation property. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/kiota-lock.json b/msgraph/generated/kiota-lock.json index d231126b604..a0b8136bea1 100644 --- a/msgraph/generated/kiota-lock.json +++ b/msgraph/generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "03B9E09A741A76AAFEBA29F6D228D8A89F212F29898DFD5C399502964D5960400BB9306E2310EFE70D87BE5B6B8267C59623C0EE0B097C0D8CBFA62907EB8ECF", + "descriptionHash": "1042B532CA384A343F908790724532FFA5D274C934C7E2E746B1A187F3F3E7FBB6C6A053C3915380A4A7AB5D84B16F419222515F693387A5C79AA7A9849F5C9D", "descriptionLocation": "../../msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.11.0", diff --git a/msgraph/generated/models/access_package_resource.py b/msgraph/generated/models/access_package_resource.py index 0e53632ccdf..99c0e0488bd 100644 --- a/msgraph/generated/models/access_package_resource.py +++ b/msgraph/generated/models/access_package_resource.py @@ -15,7 +15,7 @@ @dataclass class AccessPackageResource(Entity): - # The attributes property + # Contains information about the attributes to be collected from the requestor and sent to the resource application. attributes: Optional[List[AccessPackageResourceAttribute]] = None # 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. created_date_time: Optional[datetime.datetime] = None diff --git a/msgraph/generated/models/access_package_resource_attribute.py b/msgraph/generated/models/access_package_resource_attribute.py index 154d0dc1fa8..c04123dbd76 100644 --- a/msgraph/generated/models/access_package_resource_attribute.py +++ b/msgraph/generated/models/access_package_resource_attribute.py @@ -15,13 +15,13 @@ class AccessPackageResourceAttribute(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 destination property + # Information about how to set the attribute, currently a accessPackageUserDirectoryAttributeStore type. destination: Optional[AccessPackageResourceAttributeDestination] = None - # The name property + # The name of the attribute in the end system. If the destination is accessPackageUserDirectoryAttributeStore, then a user property such as jobTitle or a directory schema extension for the user object type, such as extension2b676109c7c74ae2b41549205f1947edpersonalTitle. name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The source property + # Information about how to populate the attribute value when an accessPackageAssignmentRequest is being fulfilled, currently a accessPackageResourceAttributeQuestion type. source: Optional[AccessPackageResourceAttributeSource] = None @staticmethod diff --git a/msgraph/generated/models/education_submission.py b/msgraph/generated/models/education_submission.py index 30675794b90..2506fb5c883 100644 --- a/msgraph/generated/models/education_submission.py +++ b/msgraph/generated/models/education_submission.py @@ -46,6 +46,8 @@ class EducationSubmission(Entity): unsubmitted_by: Optional[IdentitySet] = None # Moment in time when the submission was moved from submitted into the working state. 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 unsubmitted_date_time: Optional[datetime.datetime] = None + # The webUrl property + web_url: Optional[str] = None @staticmethod def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> EducationSubmission: @@ -92,6 +94,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "submittedResources": lambda n : setattr(self, 'submitted_resources', n.get_collection_of_object_values(EducationSubmissionResource)), "unsubmittedBy": lambda n : setattr(self, 'unsubmitted_by', n.get_object_value(IdentitySet)), "unsubmittedDateTime": lambda n : setattr(self, 'unsubmitted_date_time', n.get_datetime_value()), + "webUrl": lambda n : setattr(self, 'web_url', n.get_str_value()), } super_fields = super().get_field_deserializers() fields.update(super_fields) diff --git a/msgraph/generated/models/object_identity.py b/msgraph/generated/models/object_identity.py index 27fca277cd8..8731793f5f8 100644 --- a/msgraph/generated/models/object_identity.py +++ b/msgraph/generated/models/object_identity.py @@ -13,7 +13,7 @@ class ObjectIdentity(AdditionalDataHolder, BackedModel, Parsable): additional_data: Dict[str, Any] = field(default_factory=dict) # Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType isn't federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For guests from other Microsoft Entra organization, this is the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. issuer: Optional[str] = None - # Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must begin with alphabetical character or number, and can only contain alphanumeric characters and the following symbols: - or Supports $filter. 64 character limit. + # Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must begin with alphabetical character or number, and can only contain alphanumeric characters and the following symbols: - or . 64 character limit.Supports $filter. issuer_assigned_id: Optional[str] = None # The OdataType property odata_type: Optional[str] = None diff --git a/msgraph/generated/models/shift.py b/msgraph/generated/models/shift.py index 11d546fecb3..1f41cf9eb1d 100644 --- a/msgraph/generated/models/shift.py +++ b/msgraph/generated/models/shift.py @@ -13,11 +13,11 @@ class Shift(ChangeTrackedEntity): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.shift" - # The draft version of this shift that is viewable by managers. Required. + # Draft changes in the shift. Draft changes are only visible to managers. The changes are visible to employees when they are shared, which copies the changes from the draftShift to the sharedShift property. draft_shift: Optional[ShiftItem] = None # ID of the scheduling group the shift is part of. Required. scheduling_group_id: Optional[str] = None - # The shared version of this shift that is viewable by both employees and managers. Required. + # The shared version of this shift that is viewable by both employees and managers. Updates to the sharedShift property send notifications to users in the Teams client. shared_shift: Optional[ShiftItem] = None # ID of the user assigned to the shift. Required. user_id: Optional[str] = None diff --git a/msgraph/generated/models/time_off.py b/msgraph/generated/models/time_off.py index 6095a16d67f..198c4c75013 100644 --- a/msgraph/generated/models/time_off.py +++ b/msgraph/generated/models/time_off.py @@ -13,9 +13,9 @@ class TimeOff(ChangeTrackedEntity): # The OdataType property odata_type: Optional[str] = "#microsoft.graph.timeOff" - # The draft version of this timeOff that is viewable by managers. Required. + # The draft version of this timeOff item that is viewable by managers. It must be shared before it is visible to team members. Required. draft_time_off: Optional[TimeOffItem] = None - # The shared version of this timeOff that is viewable by both employees and managers. Required. + # The shared version of this timeOff that is viewable by both employees and managers. Updates to the sharedTimeOff property send notifications to users in the Teams client. Required. shared_time_off: Optional[TimeOffItem] = None # ID of the user assigned to the timeOff. Required. user_id: Optional[str] = None diff --git a/msgraph/generated/models/user.py b/msgraph/generated/models/user.py index 1680c3a6c46..815b9655dcd 100644 --- a/msgraph/generated/models/user.py +++ b/msgraph/generated/models/user.py @@ -196,7 +196,7 @@ class User(DirectoryObject): managed_app_registrations: Optional[List[ManagedAppRegistration]] = None # The managed devices associated with the user. managed_devices: Optional[List[ManagedDevice]] = None - # The user or contact that is this user's manager. Read-only. (HTTP Methods: GET, PUT, DELETE.). Supports $expand. + # The user or contact that is this user's manager. Read-only. Supports $expand. manager: Optional[DirectoryObject] = None # The groups and directory roles that the user is a member of. Read-only. Nullable. Supports $expand. member_of: Optional[List[DirectoryObject]] = None diff --git a/msgraph/generated/organization/organization_request_builder.py b/msgraph/generated/organization/organization_request_builder.py index 72722756863..fabcdfe953a 100644 --- a/msgraph/generated/organization/organization_request_builder.py +++ b/msgraph/generated/organization/organization_request_builder.py @@ -49,10 +49,10 @@ def by_organization_id(self,organization_id: str) -> OrganizationItemRequestBuil async def get(self,request_configuration: Optional[OrganizationRequestBuilderGetRequestConfiguration] = None) -> Optional[OrganizationCollectionResponse]: """ - Retrieve a list of organization objects. There's only one organization object in the collection. + List properties and relationships of the organization objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[OrganizationCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/organization-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-organization-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -95,7 +95,7 @@ async def post(self,body: Optional[Organization] = None, request_configuration: def to_get_request_information(self,request_configuration: Optional[OrganizationRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a list of organization objects. There's only one organization object in the collection. + List properties and relationships of the organization objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -188,7 +188,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class OrganizationRequestBuilderGetQueryParameters(): """ - Retrieve a list of organization objects. There's only one organization object in the collection. + List properties and relationships of the organization objects. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_request_body.py b/msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_request_body.py new file mode 100644 index 00000000000..59be3fc6130 --- /dev/null +++ b/msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_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.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + +@dataclass +class SecretsPutRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described 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[List[SynchronizationSecretKeyStringValuePair]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SecretsPutRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SecretsPutRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SecretsPutRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(SynchronizationSecretKeyStringValuePair)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current 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("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_response.py b/msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_response.py new file mode 100644 index 00000000000..ec04b19ebfc --- /dev/null +++ b/msgraph/generated/service_principals/item/synchronization/secrets/secrets_put_response.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.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + +@dataclass +class SecretsPutResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described 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[List[SynchronizationSecretKeyStringValuePair]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> SecretsPutResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SecretsPutResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SecretsPutResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(SynchronizationSecretKeyStringValuePair)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current 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("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/service_principals/item/synchronization/secrets/secrets_request_builder.py b/msgraph/generated/service_principals/item/synchronization/secrets/secrets_request_builder.py index 3c5ce278f17..061d7d747e8 100644 --- a/msgraph/generated/service_principals/item/synchronization/secrets/secrets_request_builder.py +++ b/msgraph/generated/service_principals/item/synchronization/secrets/secrets_request_builder.py @@ -11,8 +11,9 @@ if TYPE_CHECKING: from .....models.o_data_errors.o_data_error import ODataError - from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair from .count.count_request_builder import CountRequestBuilder + from .secrets_put_request_body import SecretsPutRequestBody + from .secrets_put_response import SecretsPutResponse class SecretsRequestBuilder(BaseRequestBuilder): """ @@ -27,12 +28,12 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni """ super().__init__(request_adapter, "{+baseurl}/servicePrincipals/{servicePrincipal%2Did}/synchronization/secrets", path_parameters) - async def put(self,body: Optional[List[SynchronizationSecretKeyStringValuePair]] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> Optional[List[SynchronizationSecretKeyStringValuePair]]: + async def put(self,body: Optional[SecretsPutRequestBody] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> Optional[SecretsPutResponse]: """ Update property secrets value. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. - Returns: Optional[List[SynchronizationSecretKeyStringValuePair]] + Returns: Optional[SecretsPutResponse] """ if not body: raise TypeError("body cannot be null.") @@ -47,11 +48,11 @@ async def put(self,body: Optional[List[SynchronizationSecretKeyStringValuePair]] } if not self.request_adapter: raise Exception("Http core is null") - from .....models.synchronization_secret_key_string_value_pair import SynchronizationSecretKeyStringValuePair + from .secrets_put_response import SecretsPutResponse - return await self.request_adapter.send_collection_async(request_info, SynchronizationSecretKeyStringValuePair, error_mapping) + return await self.request_adapter.send_async(request_info, SecretsPutResponse, error_mapping) - def to_put_request_information(self,body: Optional[List[SynchronizationSecretKeyStringValuePair]] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: + def to_put_request_information(self,body: Optional[SecretsPutRequestBody] = None, request_configuration: Optional[SecretsRequestBuilderPutRequestConfiguration] = None) -> RequestInformation: """ Update property secrets value. param body: The request body diff --git a/msgraph/generated/sites/item/get_by_path_with_path/analytics/analytics_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/analytics/analytics_request_builder.py new file mode 100644 index 00000000000..34c139003b9 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/analytics/analytics_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/analytics{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property analytics for sites + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Analytics about the view activities that took place in this site. + 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] = { + "4XX": ODataError, + "5XX": 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: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Update the navigation property analytics in sites + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property analytics for sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Analytics about the view activities that took place in this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property analytics in 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class AnalyticsRequestBuilderGetQueryParameters(): + """ + Analytics about the view activities that took place in this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[AnalyticsRequestBuilder.AnalyticsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/columns/columns_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/columns/columns_request_builder.py new file mode 100644 index 00000000000..a65bf3a411c --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/columns/columns_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/columns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinitionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-columns?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + Find more info here: https://learn.microsoft.com/graph/api/site-post-columns?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] = { + "4XX": ODataError, + "5XX": 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[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ColumnsRequestBuilder.ColumnsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py new file mode 100644 index 00000000000..e1230439964 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/content_types/content_types_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ContentTypesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentTypes property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/contentTypes{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentTypeCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: + """ + Create a new [contentType][] in a [site][]. + 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/site-post-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [contentType][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ContentTypesRequestBuilderGetQueryParameters(): + """ + Get the collection of [contentType][contentType] resources in a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ContentTypesRequestBuilder.ContentTypesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/created_by_user/created_by_user_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..069021fbaad --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/created_by_user/created_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + from .....models.user import User + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/createdByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[CreatedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[CreatedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[CreatedByUserRequestBuilder.CreatedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/drive/drive_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/drive/drive_request_builder.py new file mode 100644 index 00000000000..a9cbf4ec9a7 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/drive/drive_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/drive{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: + """ + The default drive (document library) for this site. + 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] = { + "4XX": ODataError, + "5XX": 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[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The default drive (document library) for this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + The default drive (document library) for this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DriveRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DriveRequestBuilder.DriveRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/drives/drives_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/drives/drives_request_builder.py new file mode 100644 index 00000000000..e41bab92aaf --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/drives/drives_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.drive_collection_response import DriveCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError + +class DrivesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new DrivesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/drives{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveCollectionResponse]: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.drive_collection_response import DriveCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> DrivesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DrivesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DrivesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DrivesRequestBuilderGetQueryParameters(): + """ + The collection of drives (document libraries) under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DrivesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DrivesRequestBuilder.DrivesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/external_columns/external_columns_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/external_columns/external_columns_request_builder.py new file mode 100644 index 00000000000..823523c055f --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/external_columns/external_columns_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.column_definition_collection_response import ColumnDefinitionCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError + +class ExternalColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ExternalColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/externalColumns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get externalColumns from sites + 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] = { + "4XX": ODataError, + "5XX": 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[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get externalColumns from sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ExternalColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ExternalColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ExternalColumnsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ExternalColumnsRequestBuilderGetQueryParameters(): + """ + Get externalColumns from sites + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ExternalColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ExternalColumnsRequestBuilder.ExternalColumnsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_get_response.py b/msgraph/generated/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_get_response.py new file mode 100644 index 00000000000..e248eee712b --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/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: Optional[ParseNode] = None) -> 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/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py new file mode 100644 index 00000000000..d0db9037d7a --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -0,0 +1,141 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getActivitiesByInterval(){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[GetActivitiesByIntervalRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 == "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 + + # 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetActivitiesByIntervalRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[GetActivitiesByIntervalRequestBuilder.GetActivitiesByIntervalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/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/sites/item/get_by_path_with_path/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..be9c2862d2d --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/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: Optional[ParseNode] = None) -> 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/sites/item/get_by_path_with_path/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/sites/item/get_by_path_with_path/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..e93feb881cf --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/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,148 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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: Optional[Union[Dict[str, Any], str]] = None, 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}/sites/{site%2Did}/getByPath(path='{path}')/getActivitiesByInterval(startDateTime='{startDateTime}',endDateTime='{endDateTime}',interval='{interval}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 == "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 + + # 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder.GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py b/msgraph/generated/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_get_response.py new file mode 100644 index 00000000000..6619b22570a --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_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 GetApplicableContentTypesForListWithListIdGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ContentType]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: Optional[ParseNode] = None) -> GetApplicableContentTypesForListWithListIdGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetApplicableContentTypesForListWithListIdGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetApplicableContentTypesForListWithListIdGetResponse() + + def 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/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py new file mode 100644 index 00000000000..7760ad65f74 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_applicable_content_types_for_list_with_list_id/get_applicable_content_types_for_list_with_list_id_request_builder.py @@ -0,0 +1,144 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse + +class GetApplicableContentTypesForListWithListIdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getApplicableContentTypesForList method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, list_id: Optional[str] = None) -> None: + """ + Instantiates a new GetApplicableContentTypesForListWithListIdRequestBuilder and sets the default values. + param list_id: Usage: listId='{listId}' + param path_parameters: The 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['listId'] = str(list_id) + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getApplicableContentTypesForList(listId='{listId}'){?%24top,%24skip,%24search,%24filter,%24count,%24select,%24orderby}", path_parameters) + + async def get(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> Optional[GetApplicableContentTypesForListWithListIdGetResponse]: + """ + Invoke function getApplicableContentTypesForList + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GetApplicableContentTypesForListWithListIdGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .get_applicable_content_types_for_list_with_list_id_get_response import GetApplicableContentTypesForListWithListIdGetResponse + + return await self.request_adapter.send_async(request_info, GetApplicableContentTypesForListWithListIdGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Invoke function getApplicableContentTypesForList + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> GetApplicableContentTypesForListWithListIdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetApplicableContentTypesForListWithListIdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetApplicableContentTypesForListWithListIdRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GetApplicableContentTypesForListWithListIdRequestBuilderGetQueryParameters(): + """ + Invoke function getApplicableContentTypesForList + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 == "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 + + # 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetApplicableContentTypesForListWithListIdRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[GetApplicableContentTypesForListWithListIdRequestBuilder.GetApplicableContentTypesForListWithListIdRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_request_builder.py new file mode 100644 index 00000000000..61a02cf09d9 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/analytics/analytics_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/analytics{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property analytics for sites + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Analytics about the view activities that took place in this site. + 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] = { + "4XX": ODataError, + "5XX": 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: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> Optional[ItemAnalytics]: + """ + Update the navigation property analytics in sites + 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] = { + "4XX": ODataError, + "5XX": 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[AnalyticsRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property analytics for sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[AnalyticsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Analytics about the view activities that took place in this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[ItemAnalytics] = None, request_configuration: Optional[AnalyticsRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property analytics in 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class AnalyticsRequestBuilderGetQueryParameters(): + """ + Analytics about the view activities that took place in this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[AnalyticsRequestBuilder.AnalyticsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class AnalyticsRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py new file mode 100644 index 00000000000..8d13f0ece1d --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/columns/columns_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/columns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinitionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-columns?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> Optional[ColumnDefinition]: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + Find more info here: https://learn.microsoft.com/graph/api/site-post-columns?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] = { + "4XX": ODataError, + "5XX": 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[ColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ColumnDefinition] = None, request_configuration: Optional[ColumnsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a column for a [site][site] with a request that specifies a [columnDefinition][columnDefinition]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get the collection of columns represented as [columnDefinition][columnDefinition] resources in a [site][site]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ColumnsRequestBuilder.ColumnsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py new file mode 100644 index 00000000000..4d678f7086f --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/content_types/content_types_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class ContentTypesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentTypes property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/contentTypes{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> Optional[ContentTypeCollectionResponse]: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentTypeCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> Optional[ContentType]: + """ + Create a new [contentType][] in a [site][]. + 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/site-post-contenttypes?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] = { + "4XX": ODataError, + "5XX": 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[ContentTypesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [contentType][contentType] resources in a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[ContentType] = None, request_configuration: Optional[ContentTypesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [contentType][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ContentTypesRequestBuilderGetQueryParameters(): + """ + Get the collection of [contentType][contentType] resources in a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ContentTypesRequestBuilder.ContentTypesRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ContentTypesRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..85f075adc97 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/created_by_user/created_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.o_data_errors.o_data_error import ODataError + from ......models.user import User + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/createdByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[CreatedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[CreatedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[CreatedByUserRequestBuilder.CreatedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_request_builder.py new file mode 100644 index 00000000000..bff51df3525 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drive/drive_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/drive{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DriveRequestBuilderGetRequestConfiguration] = None) -> Optional[Drive]: + """ + The default drive (document library) for this site. + 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] = { + "4XX": ODataError, + "5XX": 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[DriveRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The default drive (document library) for this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + The default drive (document library) for this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DriveRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DriveRequestBuilder.DriveRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_request_builder.py new file mode 100644 index 00000000000..5a20576bf5c --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/drives/drives_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.drive_collection_response import DriveCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + +class DrivesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new DrivesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/drives{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> Optional[DriveCollectionResponse]: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.drive_collection_response import DriveCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[DrivesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of drives (document libraries) under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> DrivesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DrivesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DrivesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DrivesRequestBuilderGetQueryParameters(): + """ + The collection of drives (document libraries) under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class DrivesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[DrivesRequestBuilder.DrivesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_request_builder.py new file mode 100644 index 00000000000..d52942a9ada --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/external_columns/external_columns_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.column_definition_collection_response import ColumnDefinitionCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + +class ExternalColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ExternalColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/externalColumns{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Get externalColumns from sites + 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] = { + "4XX": ODataError, + "5XX": 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[ExternalColumnsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get externalColumns from sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ExternalColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ExternalColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ExternalColumnsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ExternalColumnsRequestBuilderGetQueryParameters(): + """ + Get externalColumns from sites + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ExternalColumnsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ExternalColumnsRequestBuilder.ExternalColumnsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py new file mode 100644 index 00000000000..1e18f8c875b --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/get_by_path_with_path1_request_builder.py @@ -0,0 +1,249 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + from .....models.site import Site + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + 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 .drives.drives_request_builder import DrivesRequestBuilder + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + from .items.items_request_builder import ItemsRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .lists.lists_request_builder import ListsRequestBuilder + from .onenote.onenote_request_builder import OnenoteRequestBuilder + from .operations.operations_request_builder import OperationsRequestBuilder + from .permissions.permissions_request_builder import PermissionsRequestBuilder + from .sites.sites_request_builder import SitesRequestBuilder + from .term_store.term_store_request_builder import TermStoreRequestBuilder + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder + +class GetByPathWithPath1RequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getByPath method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, path1: Optional[str] = None) -> None: + """ + Instantiates a new GetByPathWithPath1RequestBuilder and sets the default values. + param path1: Usage: path='{path1}' + param path_parameters: The 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['path1'] = str(path1) + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')", path_parameters) + + async def get(self,request_configuration: Optional[GetByPathWithPath1RequestBuilderGetRequestConfiguration] = None) -> Optional[Site]: + """ + Invoke function getByPath + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Site] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.site import Site + + return await self.request_adapter.send_async(request_info, Site, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[GetByPathWithPath1RequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Invoke function getByPath + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> GetByPathWithPath1RequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetByPathWithPath1RequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetByPathWithPath1RequestBuilder(self.request_adapter, raw_url) + + @property + def analytics(self) -> AnalyticsRequestBuilder: + """ + Provides operations to manage the analytics property of the microsoft.graph.site entity. + """ + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + + return AnalyticsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.site 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.site 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.site entity. + """ + from .drive.drive_request_builder import DriveRequestBuilder + + return DriveRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def drives(self) -> DrivesRequestBuilder: + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + from .drives.drives_request_builder import DrivesRequestBuilder + + return DrivesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def external_columns(self) -> ExternalColumnsRequestBuilder: + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + + return ExternalColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def items(self) -> ItemsRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.site 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 lists(self) -> ListsRequestBuilder: + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + from .lists.lists_request_builder import ListsRequestBuilder + + return ListsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def onenote(self) -> OnenoteRequestBuilder: + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + from .onenote.onenote_request_builder import OnenoteRequestBuilder + + return OnenoteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def operations(self) -> OperationsRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + from .operations.operations_request_builder import OperationsRequestBuilder + + return OperationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permissions(self) -> PermissionsRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + from .permissions.permissions_request_builder import PermissionsRequestBuilder + + return PermissionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sites(self) -> SitesRequestBuilder: + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + from .sites.sites_request_builder import SitesRequestBuilder + + return SitesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_store(self) -> TermStoreRequestBuilder: + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + from .term_store.term_store_request_builder import TermStoreRequestBuilder + + return TermStoreRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_stores(self) -> TermStoresRequestBuilder: + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder + + return TermStoresRequestBuilder(self.request_adapter, self.path_parameters) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class GetByPathWithPath1RequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_request_builder.py new file mode 100644 index 00000000000..94c73fe7068 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/items/items_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.base_item_collection_response import BaseItemCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + +class ItemsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/items{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[BaseItemCollectionResponse]: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[BaseItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.base_item_collection_response import BaseItemCollectionResponse + + return await self.request_adapter.send_async(request_info, BaseItemCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ItemsRequestBuilderGetQueryParameters(): + """ + Used to address any item contained in this site. This collection can't be enumerated. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ItemsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..943c62cc23a --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/last_modified_by_user/last_modified_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.o_data_errors.o_data_error import ODataError + from ......models.user import User + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/lastModifiedByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LastModifiedByUserRequestBuilder.LastModifiedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py new file mode 100644 index 00000000000..fcfb0a7e959 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/lists/lists_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.list_ import List_ + from ......models.list_collection_response import ListCollectionResponse + from ......models.o_data_errors.o_data_error import ODataError + +class ListsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ListsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/lists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListCollectionResponse]: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/list-list?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.list_collection_response import ListCollectionResponse + + return await self.request_adapter.send_async(request_info, ListCollectionResponse, error_mapping) + + async def post(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> Optional[List_]: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[List_] + Find more info here: https://learn.microsoft.com/graph/api/list-create?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] = { + "4XX": ODataError, + "5XX": 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_get_request_information(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ListsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ListsRequestBuilderGetQueryParameters(): + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ListsRequestBuilder.ListsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_request_builder.py new file mode 100644 index 00000000000..ab3b875bafd --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/onenote/onenote_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.onenote import Onenote + from ......models.o_data_errors.o_data_error import ODataError + +class OnenoteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new OnenoteRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/onenote{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property onenote for sites + 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] = { + "4XX": ODataError, + "5XX": 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[OnenoteRequestBuilderGetRequestConfiguration] = None) -> Optional[Onenote]: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + async def patch(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> Optional[Onenote]: + """ + Update the navigation property onenote in sites + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + 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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property onenote for sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property onenote in 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> OnenoteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OnenoteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OnenoteRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class OnenoteRequestBuilderGetQueryParameters(): + """ + Calls the OneNote service for notebook related operations. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OnenoteRequestBuilder.OnenoteRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py new file mode 100644 index 00000000000..ad15ce70d40 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/operations/operations_request_builder.py @@ -0,0 +1,202 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class OperationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperationCollectionResponse]: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperationCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-operations?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] = { + "4XX": ODataError, + "5XX": 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: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> Optional[RichLongRunningOperation]: + """ + Create new navigation property to operations for sites + 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] = { + "4XX": ODataError, + "5XX": 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[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to operations for 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get a list of rich long-running operations associated with a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OperationsRequestBuilder.OperationsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py new file mode 100644 index 00000000000..b898cee8cb4 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/permissions/permissions_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class PermissionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/permissions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionCollectionResponse]: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PermissionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-permissions?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] = { + "4XX": ODataError, + "5XX": 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: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Permission]: + """ + Create a new permission object on a site. + 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/site-post-permissions?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] = { + "4XX": ODataError, + "5XX": 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[PermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new permission object on a site. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class PermissionsRequestBuilderGetQueryParameters(): + """ + Get the permission resources from the permissions navigation property on a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[PermissionsRequestBuilder.PermissionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py new file mode 100644 index 00000000000..8625b902add --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/sites/sites_request_builder.py @@ -0,0 +1,147 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.o_data_errors.o_data_error import ODataError + from ......models.site_collection_response import SiteCollectionResponse + +class SitesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SitesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/sites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: + """ + Get a collection of subsites defined for a [site][]. + 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-subsites?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.site_collection_response import SiteCollectionResponse + + return await self.request_adapter.send_async(request_info, SiteCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a collection of subsites defined for a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> SitesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SitesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SitesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SitesRequestBuilderGetQueryParameters(): + """ + Get a collection of subsites defined for a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SitesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SitesRequestBuilder.SitesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_request_builder.py new file mode 100644 index 00000000000..d5da21dc9f8 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_store/term_store_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.o_data_errors.o_data_error import ODataError + from ......models.term_store.store import Store + +class TermStoreRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoreRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/termStore{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property termStore for sites + 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] = { + "4XX": ODataError, + "5XX": 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[TermStoreRequestBuilderGetRequestConfiguration] = None) -> Optional[Store]: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + async def patch(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> Optional[Store]: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property termStore for sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoreRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoreRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoreRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TermStoreRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a store object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoreRequestBuilder.TermStoreRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py new file mode 100644 index 00000000000..22f44a03347 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path1/term_stores/term_stores_request_builder.py @@ -0,0 +1,201 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ......models.o_data_errors.o_data_error import ODataError + from ......models.term_store.store import Store + from ......models.term_store.store_collection_response import StoreCollectionResponse + +class TermStoresRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoresRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/getByPath(path='{path1}')/termStores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> Optional[StoreCollectionResponse]: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[StoreCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.term_store.store_collection_response import StoreCollectionResponse + + return await self.request_adapter.send_async(request_info, StoreCollectionResponse, error_mapping) + + async def post(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> Optional[Store]: + """ + Create new navigation property to termStores for sites + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to termStores for 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoresRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoresRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoresRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TermStoresRequestBuilderGetQueryParameters(): + """ + The collection of termStores under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoresRequestBuilder.TermStoresRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py index 3372ea0bbc9..1b966fc8bc9 100644 --- a/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py +++ b/msgraph/generated/sites/item/get_by_path_with_path/get_by_path_with_path_request_builder.py @@ -12,6 +12,26 @@ if TYPE_CHECKING: from ....models.o_data_errors.o_data_error import ODataError from ....models.site import Site + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + 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 .drives.drives_request_builder import DrivesRequestBuilder + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + 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 .get_applicable_content_types_for_list_with_list_id.get_applicable_content_types_for_list_with_list_id_request_builder import GetApplicableContentTypesForListWithListIdRequestBuilder + from .get_by_path_with_path1.get_by_path_with_path1_request_builder import GetByPathWithPath1RequestBuilder + from .items.items_request_builder import ItemsRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .lists.lists_request_builder import ListsRequestBuilder + from .onenote.onenote_request_builder import OnenoteRequestBuilder + from .operations.operations_request_builder import OperationsRequestBuilder + from .permissions.permissions_request_builder import PermissionsRequestBuilder + from .sites.sites_request_builder import SitesRequestBuilder + from .term_store.term_store_request_builder import TermStoreRequestBuilder + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder class GetByPathWithPathRequestBuilder(BaseRequestBuilder): """ @@ -50,6 +70,48 @@ async def get(self,request_configuration: Optional[GetByPathWithPathRequestBuild return await self.request_adapter.send_async(request_info, Site, error_mapping) + def get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval(self,end_date_time: Optional[str] = None, interval: Optional[str] = None, start_date_time: Optional[str] = None) -> 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) + + def get_applicable_content_types_for_list_with_list_id(self,list_id: Optional[str] = None) -> GetApplicableContentTypesForListWithListIdRequestBuilder: + """ + Provides operations to call the getApplicableContentTypesForList method. + param list_id: Usage: listId='{listId}' + Returns: GetApplicableContentTypesForListWithListIdRequestBuilder + """ + if not list_id: + raise TypeError("list_id cannot be null.") + from .get_applicable_content_types_for_list_with_list_id.get_applicable_content_types_for_list_with_list_id_request_builder import GetApplicableContentTypesForListWithListIdRequestBuilder + + return GetApplicableContentTypesForListWithListIdRequestBuilder(self.request_adapter, self.path_parameters, list_id) + + def get_by_path_with_path1(self,path1: Optional[str] = None) -> GetByPathWithPath1RequestBuilder: + """ + Provides operations to call the getByPath method. + param path1: Usage: path='{path1}' + Returns: GetByPathWithPath1RequestBuilder + """ + if not path1: + raise TypeError("path1 cannot be null.") + from .get_by_path_with_path1.get_by_path_with_path1_request_builder import GetByPathWithPath1RequestBuilder + + return GetByPathWithPath1RequestBuilder(self.request_adapter, self.path_parameters, path1) + def to_get_request_information(self,request_configuration: Optional[GetByPathWithPathRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ Invoke function getByPath @@ -76,6 +138,159 @@ def with_url(self,raw_url: Optional[str] = None) -> GetByPathWithPathRequestBuil raise TypeError("raw_url cannot be null.") return GetByPathWithPathRequestBuilder(self.request_adapter, raw_url) + @property + def analytics(self) -> AnalyticsRequestBuilder: + """ + Provides operations to manage the analytics property of the microsoft.graph.site entity. + """ + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + + return AnalyticsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.site 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.site 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.site entity. + """ + from .drive.drive_request_builder import DriveRequestBuilder + + return DriveRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def drives(self) -> DrivesRequestBuilder: + """ + Provides operations to manage the drives property of the microsoft.graph.site entity. + """ + from .drives.drives_request_builder import DrivesRequestBuilder + + return DrivesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def external_columns(self) -> ExternalColumnsRequestBuilder: + """ + Provides operations to manage the externalColumns property of the microsoft.graph.site entity. + """ + from .external_columns.external_columns_request_builder import ExternalColumnsRequestBuilder + + return ExternalColumnsRequestBuilder(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 items(self) -> ItemsRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.site 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 lists(self) -> ListsRequestBuilder: + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + from .lists.lists_request_builder import ListsRequestBuilder + + return ListsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def onenote(self) -> OnenoteRequestBuilder: + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + from .onenote.onenote_request_builder import OnenoteRequestBuilder + + return OnenoteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def operations(self) -> OperationsRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + from .operations.operations_request_builder import OperationsRequestBuilder + + return OperationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permissions(self) -> PermissionsRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + from .permissions.permissions_request_builder import PermissionsRequestBuilder + + return PermissionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sites(self) -> SitesRequestBuilder: + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + from .sites.sites_request_builder import SitesRequestBuilder + + return SitesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_store(self) -> TermStoreRequestBuilder: + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + from .term_store.term_store_request_builder import TermStoreRequestBuilder + + return TermStoreRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def term_stores(self) -> TermStoresRequestBuilder: + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + from .term_stores.term_stores_request_builder import TermStoresRequestBuilder + + return TermStoresRequestBuilder(self.request_adapter, self.path_parameters) + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration @dataclass diff --git a/msgraph/generated/sites/item/get_by_path_with_path/items/items_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/items/items_request_builder.py new file mode 100644 index 00000000000..a5c3fb66b30 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/items/items_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.base_item_collection_response import BaseItemCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError + +class ItemsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/items{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> Optional[BaseItemCollectionResponse]: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[BaseItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.base_item_collection_response import BaseItemCollectionResponse + + return await self.request_adapter.send_async(request_info, BaseItemCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[ItemsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Used to address any item contained in this site. This collection can't be enumerated. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class ItemsRequestBuilderGetQueryParameters(): + """ + Used to address any item contained in this site. This collection can't be enumerated. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ItemsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ItemsRequestBuilder.ItemsRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..e4215c1551a --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/last_modified_by_user/last_modified_by_user_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + from .....models.user import User + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/lastModifiedByUser{?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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] = { + "4XX": ODataError, + "5XX": 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[LastModifiedByUserRequestBuilderGetRequestConfiguration] = 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LastModifiedByUserRequestBuilder.LastModifiedByUserRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/lists/lists_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/lists/lists_request_builder.py new file mode 100644 index 00000000000..02a1bccab86 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/lists/lists_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.list_ import List_ + from .....models.list_collection_response import ListCollectionResponse + from .....models.o_data_errors.o_data_error import ODataError + +class ListsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lists property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new ListsRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/lists{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> Optional[ListCollectionResponse]: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/list-list?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.list_collection_response import ListCollectionResponse + + return await self.request_adapter.send_async(request_info, ListCollectionResponse, error_mapping) + + async def post(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> Optional[List_]: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[List_] + Find more info here: https://learn.microsoft.com/graph/api/list-create?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] = { + "4XX": ODataError, + "5XX": 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_get_request_information(self,request_configuration: Optional[ListsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[List_] = None, request_configuration: Optional[ListsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new [list][] in a [site][]. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> ListsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ListsRequestBuilderGetQueryParameters(): + """ + Get the collection of [lists][] for a [site][]. Lists with the [system][] facet are hidden by default.To list them, include system in your $select statement. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[ListsRequestBuilder.ListsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class ListsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/onenote/onenote_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/onenote/onenote_request_builder.py new file mode 100644 index 00000000000..11cd881aa7c --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/onenote/onenote_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.onenote import Onenote + from .....models.o_data_errors.o_data_error import ODataError + +class OnenoteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the onenote property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new OnenoteRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/onenote{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property onenote for sites + 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] = { + "4XX": ODataError, + "5XX": 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[OnenoteRequestBuilderGetRequestConfiguration] = None) -> Optional[Onenote]: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + async def patch(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> Optional[Onenote]: + """ + Update the navigation property onenote in sites + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Onenote] + """ + 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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.onenote import Onenote + + return await self.request_adapter.send_async(request_info, Onenote, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[OnenoteRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property onenote for sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[OnenoteRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Calls the OneNote service for notebook related operations. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Onenote] = None, request_configuration: Optional[OnenoteRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the navigation property onenote in 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> OnenoteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OnenoteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OnenoteRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class OnenoteRequestBuilderGetQueryParameters(): + """ + Calls the OneNote service for notebook related operations. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OnenoteRequestBuilder.OnenoteRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OnenoteRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/operations/operations_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/operations/operations_request_builder.py new file mode 100644 index 00000000000..bf06ccfe1ef --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/operations/operations_request_builder.py @@ -0,0 +1,202 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class OperationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/operations{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[OperationsRequestBuilderGetRequestConfiguration] = None) -> Optional[RichLongRunningOperationCollectionResponse]: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperationCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-operations?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] = { + "4XX": ODataError, + "5XX": 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: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> Optional[RichLongRunningOperation]: + """ + Create new navigation property to operations for sites + 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] = { + "4XX": ODataError, + "5XX": 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[OperationsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a list of rich long-running operations associated with a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[RichLongRunningOperation] = None, request_configuration: Optional[OperationsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to operations for 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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(): + """ + Get a list of rich long-running operations associated with a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[OperationsRequestBuilder.OperationsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class OperationsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py new file mode 100644 index 00000000000..9e357451a2e --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/permissions/permissions_request_builder.py @@ -0,0 +1,203 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +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 + +class PermissionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> 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}/sites/{site%2Did}/getByPath(path='{path}')/permissions{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[PermissionsRequestBuilderGetRequestConfiguration] = None) -> Optional[PermissionCollectionResponse]: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PermissionCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/site-list-permissions?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] = { + "4XX": ODataError, + "5XX": 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: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> Optional[Permission]: + """ + Create a new permission object on a site. + 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/site-post-permissions?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] = { + "4XX": ODataError, + "5XX": 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[PermissionsRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the permission resources from the permissions navigation property on a site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Permission] = None, request_configuration: Optional[PermissionsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create a new permission object on a site. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> 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) + + @dataclass + class PermissionsRequestBuilderGetQueryParameters(): + """ + Get the permission resources from the permissions navigation property on a site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[PermissionsRequestBuilder.PermissionsRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class PermissionsRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/sites/sites_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/sites/sites_request_builder.py new file mode 100644 index 00000000000..3538d2eddea --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/sites/sites_request_builder.py @@ -0,0 +1,147 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + from .....models.site_collection_response import SiteCollectionResponse + +class SitesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sites property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new SitesRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/sites{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> Optional[SiteCollectionResponse]: + """ + Get a collection of subsites defined for a [site][]. + 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-subsites?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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.site_collection_response import SiteCollectionResponse + + return await self.request_adapter.send_async(request_info, SiteCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[SitesRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get a collection of subsites defined for a [site][]. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> SitesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SitesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SitesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SitesRequestBuilderGetQueryParameters(): + """ + Get a collection of subsites defined for a [site][]. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class SitesRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[SitesRequestBuilder.SitesRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/term_store/term_store_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/term_store/term_store_request_builder.py new file mode 100644 index 00000000000..487152f169c --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/term_store/term_store_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.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + from .....models.term_store.store import Store + +class TermStoreRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStore property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoreRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/termStore{?%24select,%24expand}", path_parameters) + + async def delete(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> None: + """ + Delete navigation property termStore for sites + 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] = { + "4XX": ODataError, + "5XX": 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[TermStoreRequestBuilderGetRequestConfiguration] = None) -> Optional[Store]: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + async def patch(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> Optional[Store]: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + Find more info here: https://learn.microsoft.com/graph/api/termstore-store-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[TermStoreRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: + """ + Delete navigation property termStore for sites + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.DELETE + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[TermStoreRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Read the properties and relationships of a store object. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoreRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: + """ + Update the properties of a store object. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.PATCH + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoreRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoreRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoreRequestBuilder(self.request_adapter, raw_url) + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + @dataclass + class TermStoreRequestBuilderGetQueryParameters(): + """ + Read the properties and relationships of a store object. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoreRequestBuilder.TermStoreRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoreRequestBuilderPatchRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py b/msgraph/generated/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py new file mode 100644 index 00000000000..b6b9c95b978 --- /dev/null +++ b/msgraph/generated/sites/item/get_by_path_with_path/term_stores/term_stores_request_builder.py @@ -0,0 +1,201 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + from .....models.term_store.store import Store + from .....models.term_store.store_collection_response import StoreCollectionResponse + +class TermStoresRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the termStores property of the microsoft.graph.site entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None) -> None: + """ + Instantiates a new TermStoresRequestBuilder and sets the default values. + param path_parameters: The raw url or the Url template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/sites/{site%2Did}/getByPath(path='{path}')/termStores{?%24top,%24skip,%24search,%24filter,%24count,%24orderby,%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> Optional[StoreCollectionResponse]: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[StoreCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.term_store.store_collection_response import StoreCollectionResponse + + return await self.request_adapter.send_async(request_info, StoreCollectionResponse, error_mapping) + + async def post(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> Optional[Store]: + """ + Create new navigation property to termStores for sites + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Store] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.term_store.store import Store + + return await self.request_adapter.send_async(request_info, Store, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[TermStoresRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + The collection of termStores under this site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Optional[Store] = None, request_configuration: Optional[TermStoresRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: + """ + Create new navigation property to termStores for 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() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.POST + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> TermStoresRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TermStoresRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TermStoresRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TermStoresRequestBuilderGetQueryParameters(): + """ + The collection of termStores under this site. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[TermStoresRequestBuilder.TermStoresRequestBuilderGetQueryParameters] = None + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class TermStoresRequestBuilderPostRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + + diff --git a/msgraph/generated/sites/item/lists/item/list_item_request_builder.py b/msgraph/generated/sites/item/lists/item/list_item_request_builder.py index aab9bedc00b..a149f94abb6 100644 --- a/msgraph/generated/sites/item/lists/item/list_item_request_builder.py +++ b/msgraph/generated/sites/item/lists/item/list_item_request_builder.py @@ -55,10 +55,10 @@ async def delete(self,request_configuration: Optional[ListItemRequestBuilderDele async def get(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> Optional[List_]: """ - Get a list of rich long-running operations associated with a list. + Returns the metadata for a [list][]. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[List_] - Find more info here: https://learn.microsoft.com/graph/api/list-list-operations?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/list-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -117,7 +117,7 @@ def to_delete_request_information(self,request_configuration: Optional[ListItemR def to_get_request_information(self,request_configuration: Optional[ListItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Get a list of rich long-running operations associated with a list. + Returns the metadata for a [list][]. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -247,7 +247,7 @@ class ListItemRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class ListItemRequestBuilderGetQueryParameters(): """ - Get a list of rich long-running operations associated with a list. + Returns the metadata for a [list][]. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ 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 e8ded22bead..0886eb98520 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 @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 """ diff --git a/msgraph/generated/teams/item/channels/item/messages/item/replies/replies_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/item/replies/replies_request_builder.py index c66afb45beb..9718bcbfae1 100644 --- a/msgraph/generated/teams/item/channels/item/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/teams/item/channels/item/messages/messages_request_builder.py b/msgraph/generated/teams/item/channels/item/messages/messages_request_builder.py index 116868484d5..3f8e95fcbf7 100644 --- a/msgraph/generated/teams/item/channels/item/messages/messages_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/messages/messages_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified channel. 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/channel-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified 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/teams/item/primary_channel/members/item/conversation_member_item_request_builder.py b/msgraph/generated/teams/item/primary_channel/members/item/conversation_member_item_request_builder.py index f7d54aa8313..c3c85bc0013 100644 --- a/msgraph/generated/teams/item/primary_channel/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/members/item/conversation_member_item_request_builder.py @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 """ diff --git a/msgraph/generated/teams/item/primary_channel/messages/item/replies/replies_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/item/replies/replies_request_builder.py index f4ffa6dae76..cc4c29ce68a 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/teams/item/primary_channel/messages/messages_request_builder.py b/msgraph/generated/teams/item/primary_channel/messages/messages_request_builder.py index 535bf52b7f8..b11a7928888 100644 --- a/msgraph/generated/teams/item/primary_channel/messages/messages_request_builder.py +++ b/msgraph/generated/teams/item/primary_channel/messages/messages_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified channel. 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/channel-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified 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/teams/item/schedule/share/share_request_builder.py b/msgraph/generated/teams/item/schedule/share/share_request_builder.py index c35cfc8070d..f29deb73008 100644 --- a/msgraph/generated/teams/item/schedule/share/share_request_builder.py +++ b/msgraph/generated/teams/item/schedule/share/share_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SharePostRequestBody] = None, request_configuration: Optional[ShareRequestBuilderPostRequestConfiguration] = None) -> None: """ - Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. + Share a schedule time range with schedule members. This action makes the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers. Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -51,7 +51,7 @@ async def post(self,body: Optional[SharePostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[SharePostRequestBody] = None, request_configuration: Optional[ShareRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. + Share a schedule time range with schedule members. This action makes the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers. Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. 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/teamwork/deleted_teams/item/channels/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/item/conversation_member_item_request_builder.py index c9e5bac780f..e98409c614f 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/members/item/conversation_member_item_request_builder.py @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 """ diff --git a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/replies_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/replies_request_builder.py index 5ba9b1a5d29..88a515feb45 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/teamwork/deleted_teams/item/channels/item/messages/messages_request_builder.py b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/messages_request_builder.py index a7713e992ba..2af28130701 100644 --- a/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/messages_request_builder.py +++ b/msgraph/generated/teamwork/deleted_teams/item/channels/item/messages/messages_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified channel. 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/channel-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified 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/users/item/chats/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/users/item/chats/item/members/item/conversation_member_item_request_builder.py index 9a2ca9fd736..117af3cae0a 100644 --- a/msgraph/generated/users/item/chats/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/users/item/chats/item/members/item/conversation_member_item_request_builder.py @@ -48,10 +48,10 @@ async def delete(self,request_configuration: Optional[ConversationMemberItemRequ async def get(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> Optional[ConversationMember]: """ - Retrieve a conversationMember from a chat. + Retrieve a conversationMember from a chat or channel. 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/chat-get-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -110,7 +110,7 @@ def to_delete_request_information(self,request_configuration: Optional[Conversat def to_get_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Retrieve a conversationMember from a chat. + Retrieve a conversationMember from a chat or channel. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -168,7 +168,7 @@ class ConversationMemberItemRequestBuilderDeleteRequestConfiguration(BaseRequest @dataclass class ConversationMemberItemRequestBuilderGetQueryParameters(): """ - Retrieve a conversationMember from a chat. + Retrieve a conversationMember from a chat or channel. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/chats/item/messages/item/replies/replies_request_builder.py b/msgraph/generated/users/item/chats/item/messages/item/replies/replies_request_builder.py index 4aa63e968cf..8b139b02489 100644 --- a/msgraph/generated/users/item/chats/item/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/users/item/chats/item/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/users/item/employee_experience/employee_experience_request_builder.py b/msgraph/generated/users/item/employee_experience/employee_experience_request_builder.py index 0af808b6c08..b09b9f63e1e 100644 --- a/msgraph/generated/users/item/employee_experience/employee_experience_request_builder.py +++ b/msgraph/generated/users/item/employee_experience/employee_experience_request_builder.py @@ -13,6 +13,7 @@ from ....models.employee_experience_user import EmployeeExperienceUser from ....models.o_data_errors.o_data_error import ODataError from .learning_course_activities.learning_course_activities_request_builder import LearningCourseActivitiesRequestBuilder + from .learning_course_activities_with_externalcourse_activity_id.learning_course_activities_with_externalcourse_activity_id_request_builder import LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder class EmployeeExperienceRequestBuilder(BaseRequestBuilder): """ @@ -67,6 +68,18 @@ async def get(self,request_configuration: Optional[EmployeeExperienceRequestBuil return await self.request_adapter.send_async(request_info, EmployeeExperienceUser, error_mapping) + def learning_course_activities_with_externalcourse_activity_id(self,externalcourse_activity_id: Optional[str] = None) -> LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder: + """ + Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + param externalcourse_activity_id: Alternate key of learningCourseActivity + Returns: LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + """ + if not externalcourse_activity_id: + raise TypeError("externalcourse_activity_id cannot be null.") + from .learning_course_activities_with_externalcourse_activity_id.learning_course_activities_with_externalcourse_activity_id_request_builder import LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + + return LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(self.request_adapter, self.path_parameters, externalcourse_activity_id) + async def patch(self,body: Optional[EmployeeExperienceUser] = None, request_configuration: Optional[EmployeeExperienceRequestBuilderPatchRequestConfiguration] = None) -> Optional[EmployeeExperienceUser]: """ Update the navigation property employeeExperience in users diff --git a/msgraph/generated/users/item/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py b/msgraph/generated/users/item/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py new file mode 100644 index 00000000000..0b176e69c98 --- /dev/null +++ b/msgraph/generated/users/item/employee_experience/learning_course_activities_with_externalcourse_activity_id/learning_course_activities_with_externalcourse_activity_id_request_builder.py @@ -0,0 +1,120 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .....models.learning_course_activity import LearningCourseActivity + from .....models.o_data_errors.o_data_error import ODataError + +class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the learningCourseActivities property of the microsoft.graph.employeeExperienceUser entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Union[Dict[str, Any], str]] = None, externalcourse_activity_id: Optional[str] = None) -> None: + """ + Instantiates a new LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder and sets the default values. + param externalcourse_activity_id: Alternate key of learningCourseActivity + param path_parameters: The 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['externalcourseActivityId'] = str(externalcourse_activity_id) + super().__init__(request_adapter, "{+baseurl}/users/{user%2Did}/employeeExperience/learningCourseActivities(externalcourseActivityId='{externalcourseActivityId}'){?%24select,%24expand}", path_parameters) + + async def get(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration] = None) -> Optional[LearningCourseActivity]: + """ + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[LearningCourseActivity] + Find more info here: https://learn.microsoft.com/graph/api/learningcourseactivity-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] = { + "4XX": ODataError, + "5XX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.learning_course_activity import LearningCourseActivity + + return await self.request_adapter.send_async(request_info, LearningCourseActivity, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: + """ + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation() + if request_configuration: + request_info.headers.add_all(request_configuration.headers) + request_info.set_query_string_parameters_from_raw_object(request_configuration.query_parameters) + request_info.add_request_options(request_configuration.options) + request_info.url_template = self.url_template + request_info.path_parameters = self.path_parameters + request_info.http_method = Method.GET + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: Optional[str] = None) -> LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetQueryParameters(): + """ + Get the specified learningCourseActivity object using either an ID or an externalCourseActivityId of the learning provider, or a courseActivityId of a user. + """ + def get_query_parameter(self,original_name: Optional[str] = None) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: 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 + + + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + @dataclass + class LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetRequestConfiguration(BaseRequestConfiguration): + from kiota_abstractions.base_request_configuration import BaseRequestConfiguration + + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + # Request query parameters + query_parameters: Optional[LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilder.LearningCourseActivitiesWithExternalcourseActivityIdRequestBuilderGetQueryParameters] = None + + + diff --git a/msgraph/generated/users/item/events/events_request_builder.py b/msgraph/generated/users/item/events/events_request_builder.py index 34da4c4d1bb..0ee6bde33c0 100644 --- a/msgraph/generated/users/item/events/events_request_builder.py +++ b/msgraph/generated/users/item/events/events_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[EventsRequestBuilderGetReques async def post(self,body: Optional[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> Optional[Event]: """ - Create one or more multi-value extended properties in a new or existing instance of a resource. The following user resources are supported: The following group resources are supported: See Extended properties overview for more information about when to useopen extensions or extended properties, and how to specify extended properties. + Create one or more single-value extended properties in a new or existing instance of a resource. The following user resources are supported: The following group resources: See Extended properties overview for more information about when to useopen extensions or extended properties, and how to specify extended properties. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Event] - Find more info here: https://learn.microsoft.com/graph/api/multivaluelegacyextendedproperty-post-multivalueextendedproperties?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/singlevaluelegacyextendedproperty-post-singlevalueextendedproperties?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[EventsReques def to_post_request_information(self,body: Optional[Event] = None, request_configuration: Optional[EventsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create one or more multi-value extended properties in a new or existing instance of a resource. The following user resources are supported: The following group resources are supported: See Extended properties overview for more information about when to useopen extensions or extended properties, and how to specify extended properties. + Create one or more single-value extended properties in a new or existing instance of a resource. The following user resources are supported: The following group resources: See Extended properties overview for more information about when to useopen extensions or extended properties, and how to specify extended properties. 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/joined_teams/item/channels/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/members/item/conversation_member_item_request_builder.py index b6d5826160e..39a532d63a9 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/members/item/conversation_member_item_request_builder.py @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 """ diff --git a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/replies_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/replies_request_builder.py index 695b1321789..e7714ee973a 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/users/item/joined_teams/item/channels/item/messages/messages_request_builder.py b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/messages_request_builder.py index 870e69d4e34..9eb5dc9b961 100644 --- a/msgraph/generated/users/item/joined_teams/item/channels/item/messages/messages_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/channels/item/messages/messages_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified channel. 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/channel-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified 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/users/item/joined_teams/item/primary_channel/members/item/conversation_member_item_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/item/conversation_member_item_request_builder.py index 4b70277d560..ca85a95be40 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/members/item/conversation_member_item_request_builder.py @@ -28,10 +28,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 @@ -95,7 +95,7 @@ async def patch(self,body: Optional[ConversationMember] = None, request_configur def to_delete_request_information(self,request_configuration: Optional[ConversationMemberItemRequestBuilderDeleteRequestConfiguration] = 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 """ diff --git a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/replies_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/replies_request_builder.py index 895665bd552..70b788a6cab 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/replies_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/item/replies/replies_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[RepliesRequestBuilderGetReque async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified channel. 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/channel-post-messagereply?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post-replies?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[RepliesReque def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[RepliesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a new reply to a chatMessage in a specified channel. + Send a new reply to a chatMessage in a specified 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/users/item/joined_teams/item/primary_channel/messages/messages_request_builder.py b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/messages_request_builder.py index 2fac003286b..3e961f641bc 100644 --- a/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/messages_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/primary_channel/messages/messages_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified channel. 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/channel-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[ChatMessage] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified 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/users/item/joined_teams/item/schedule/share/share_request_builder.py b/msgraph/generated/users/item/joined_teams/item/schedule/share/share_request_builder.py index 51f12cdbf3c..e0b603e425c 100644 --- a/msgraph/generated/users/item/joined_teams/item/schedule/share/share_request_builder.py +++ b/msgraph/generated/users/item/joined_teams/item/schedule/share/share_request_builder.py @@ -28,7 +28,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def post(self,body: Optional[SharePostRequestBody] = None, request_configuration: Optional[ShareRequestBuilderPostRequestConfiguration] = None) -> None: """ - Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. + Share a schedule time range with schedule members. This action makes the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers. Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None @@ -51,7 +51,7 @@ async def post(self,body: Optional[SharePostRequestBody] = None, request_configu def to_post_request_information(self,body: Optional[SharePostRequestBody] = None, request_configuration: Optional[ShareRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Share a schedule time range with schedule members.Make the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers.Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. + Share a schedule time range with schedule members. This action makes the collections of shift, openshift and timeOff items in the specified time range of the schedule viewable by the specified team members, including employees and managers. Each shift, openshift and timeOff instance in a schedule supports a draft version and a shared version of the item. The draft version is viewable by only managers, and the shared version is viewable by employees and managers. For each shift, openshift and timeOff instance in the specified time range, the share action updates the shared version from the draft version, so that in addition to managers, employees can also view the most current information about the item. The notifyTeam parameter further specifies which employees can view the item. 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/mail_folders/item/child_folders/child_folders_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/child_folders_request_builder.py index 3a21767cd9c..500cbf7501a 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/child_folders_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/child_folders_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[ChildFoldersRequestBuilderGet async def post(self,body: Optional[MailFolder] = None, request_configuration: Optional[ChildFoldersRequestBuilderPostRequestConfiguration] = None) -> Optional[MailFolder]: """ - Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. + Create a new mailSearchFolder in the specified user's mailbox. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MailFolder] - Find more info here: https://learn.microsoft.com/graph/api/mailfolder-post-childfolders?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/mailsearchfolder-post?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[ChildFolders def to_post_request_information(self,body: Optional[MailFolder] = None, request_configuration: Optional[ChildFoldersRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new child mailFolder. If you intend a new folder to be hidden, you must set the isHidden property to true on creation. + Create a new mailSearchFolder in the specified user's mailbox. 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/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py index 3e1fd30a2e9..c9263da21a6 100644 --- a/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/child_folders/item/messages/item/attachments/attachments_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetR async def post(self,body: Optional[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[Attachment]: """ - Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] - Find more info here: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentsR def to_post_request_information(self,body: Optional[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. 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/mail_folders/item/messages/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/attachments_request_builder.py index ea32c05394c..99df7777920 100644 --- a/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/mail_folders/item/messages/item/attachments/attachments_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetR async def post(self,body: Optional[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[Attachment]: """ - Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] - Find more info here: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentsR def to_post_request_information(self,body: Optional[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. 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/messages/item/attachments/attachments_request_builder.py b/msgraph/generated/users/item/messages/item/attachments/attachments_request_builder.py index a800954b9cd..0f98fb62748 100644 --- a/msgraph/generated/users/item/messages/item/attachments/attachments_request_builder.py +++ b/msgraph/generated/users/item/messages/item/attachments/attachments_request_builder.py @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[AttachmentsRequestBuilderGetR async def post(self,body: Optional[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> Optional[Attachment]: """ - Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Attachment] - Find more info here: https://learn.microsoft.com/graph/api/eventmessage-post-attachments?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/message-post-attachments?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[AttachmentsR def to_post_request_information(self,body: Optional[Attachment] = None, request_configuration: Optional[AttachmentsRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Use this API to create a new Attachment. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. + Use this API to add an attachment to a message. An attachment can be one of the following types: All these types of attachment resources are derived from the attachmentresource. You can add an attachment to an existing message by posting to its attachments collection, or you canadd an attachment to a message that is being created and sent on the fly. This operation limits the size of the attachment you can add to under 3 MB. 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/messages/item/message_item_request_builder.py b/msgraph/generated/users/item/messages/item/message_item_request_builder.py index 777c5c94814..7e43ac7efec 100644 --- a/msgraph/generated/users/item/messages/item/message_item_request_builder.py +++ b/msgraph/generated/users/item/messages/item/message_item_request_builder.py @@ -63,7 +63,7 @@ async def get(self,request_configuration: Optional[MessageItemRequestBuilderGetR The messages in a mailbox or folder. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Message] - Find more info here: https://learn.microsoft.com/graph/api/singlevaluelegacyextendedproperty-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/message-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/users/item/messages/item/value/content_request_builder.py b/msgraph/generated/users/item/messages/item/value/content_request_builder.py index 92880a9f336..3325bb837fc 100644 --- a/msgraph/generated/users/item/messages/item/value/content_request_builder.py +++ b/msgraph/generated/users/item/messages/item/value/content_request_builder.py @@ -30,7 +30,7 @@ async def get(self,request_configuration: Optional[ContentRequestBuilderGetReque Get media content for the navigation property messages from users 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/user-list-messages?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration diff --git a/msgraph/generated/users/item/messages/messages_request_builder.py b/msgraph/generated/users/item/messages/messages_request_builder.py index 5668c63edd2..a18b17a44fb 100644 --- a/msgraph/generated/users/item/messages/messages_request_builder.py +++ b/msgraph/generated/users/item/messages/messages_request_builder.py @@ -49,7 +49,7 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ The messages in a mailbox or folder. Read-only. Nullable. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MessageCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/user-list-messages?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -68,11 +68,11 @@ async def get(self,request_configuration: Optional[MessagesRequestBuilderGetRequ async def post(self,body: Optional[Message] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> Optional[Message]: """ - Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the message.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. + 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[Message] - Find more info here: https://learn.microsoft.com/graph/api/user-post-messages?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.") @@ -110,7 +110,7 @@ def to_get_request_information(self,request_configuration: Optional[MessagesRequ def to_post_request_information(self,body: Optional[Message] = None, request_configuration: Optional[MessagesRequestBuilderPostRequestConfiguration] = None) -> RequestInformation: """ - Create a draft of a new message in either JSON or MIME format. When using JSON format, you can:- Include an attachment to the message.- Update the draft later to add content to the body or change other message properties. When using MIME format:- Provide the applicable Internet message headers and the MIME content, all encoded in base64 format in the request body.- /* Add any attachments and S/MIME properties to the MIME content. By default, this operation saves the draft in the Drafts folder. Send the draft message in a subsequent operation. Alternatively, send a new message in a single operation, or create a draft to forward, reply and reply-all to an existing message. + 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/users/item/presence/presence_request_builder.py b/msgraph/generated/users/item/presence/presence_request_builder.py index b9995ff338d..940a1998e02 100644 --- a/msgraph/generated/users/item/presence/presence_request_builder.py +++ b/msgraph/generated/users/item/presence/presence_request_builder.py @@ -52,10 +52,10 @@ async def delete(self,request_configuration: Optional[PresenceRequestBuilderDele async def get(self,request_configuration: Optional[PresenceRequestBuilderGetRequestConfiguration] = None) -> Optional[Presence]: """ - Set a presence status message for a user. An optional expiration date and time can be supplied. + Get a user's presence information. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Presence] - Find more info here: https://learn.microsoft.com/graph/api/presence-setstatusmessage?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/presence-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[PresenceR def to_get_request_information(self,request_configuration: Optional[PresenceRequestBuilderGetRequestConfiguration] = None) -> RequestInformation: """ - Set a presence status message for a user. An optional expiration date and time can be supplied. + Get a user's presence information. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -217,7 +217,7 @@ class PresenceRequestBuilderDeleteRequestConfiguration(BaseRequestConfiguration) @dataclass class PresenceRequestBuilderGetQueryParameters(): """ - Set a presence status message for a user. An optional expiration date and time can be supplied. + Get a user's presence information. """ def get_query_parameter(self,original_name: Optional[str] = None) -> str: """ diff --git a/msgraph/generated/users/item/user_item_request_builder.py b/msgraph/generated/users/item/user_item_request_builder.py index 57ee7692c1d..ddc77175380 100644 --- a/msgraph/generated/users/item/user_item_request_builder.py +++ b/msgraph/generated/users/item/user_item_request_builder.py @@ -101,10 +101,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Optional[Uni async def delete(self,request_configuration: Optional[UserItemRequestBuilderDeleteRequestConfiguration] = None) -> None: """ - Delete user. When deleted, user resources are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. + Deletes a user. 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/user-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-user-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -158,11 +158,11 @@ async def get(self,request_configuration: Optional[UserItemRequestBuilderGetRequ async def patch(self,body: Optional[User] = None, request_configuration: Optional[UserItemRequestBuilderPatchRequestConfiguration] = None) -> Optional[User]: """ - Update the properties of a user object. + Update the properties of a user object. Not all properties can be updated by Member or Guest users with their default permissions without Administrator roles. Compare member and guest default permissions to see properties they can manage. 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-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/user-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -198,7 +198,7 @@ def reminder_view_with_start_date_time_with_end_date_time(self,end_date_time: Op def to_delete_request_information(self,request_configuration: Optional[UserItemRequestBuilderDeleteRequestConfiguration] = None) -> RequestInformation: """ - Delete user. When deleted, user resources are moved to a temporary container and can be restored within 30 days. After that time, they are permanently deleted. To learn more, see deletedItems. + Deletes a user. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -231,7 +231,7 @@ def to_get_request_information(self,request_configuration: Optional[UserItemRequ def to_patch_request_information(self,body: Optional[User] = None, request_configuration: Optional[UserItemRequestBuilderPatchRequestConfiguration] = None) -> RequestInformation: """ - Update the properties of a user object. + Update the properties of a user object. Not all properties can be updated by Member or Guest users with their default permissions without Administrator roles. Compare member and guest default permissions to see properties they can manage. 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/users_request_builder.py b/msgraph/generated/users/users_request_builder.py index 7a3a820bf76..e8f3e83cba8 100644 --- a/msgraph/generated/users/users_request_builder.py +++ b/msgraph/generated/users/users_request_builder.py @@ -52,7 +52,7 @@ async def get(self,request_configuration: Optional[UsersRequestBuilderGetRequest List properties and relationships of the 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-mam-user-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-user-list?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[UsersRequestBuilderGetRequest async def post(self,body: Optional[User] = None, request_configuration: Optional[UsersRequestBuilderPostRequestConfiguration] = 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-mam-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.") @@ -113,7 +113,7 @@ def to_get_request_information(self,request_configuration: Optional[UsersRequest def to_post_request_information(self,body: Optional[User] = None, request_configuration: Optional[UsersRequestBuilderPostRequestConfiguration] = 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 From a9cf3c16a0c4237b8ed320e600c7380a33547137 Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Wed, 24 Jan 2024 13:16:08 +0300 Subject: [PATCH 2/7] Add changelog entry --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3e4366dc30..070d0dacc09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.1.0] - 2024-01-11 +## [1.1.0] - 2024-01-24 ### Added ### Changed - - Latest metadata updates from 9th January 2024. + - Latest metadata updates from 23rd January 2024. ## [1.0.0] - 2023-10-31 From c3cb328249277345e69f136b59547870fd903563 Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Wed, 24 Jan 2024 13:16:24 +0300 Subject: [PATCH 3/7] Bump package version --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b4f0c86f6a5..9162a607c6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "msgraph-sdk" -version = "1.0.0" +version = "1.1.0" authors = [{name = "Microsoft", email = "graphtooling+python@microsoft.com"}] description = "The Microsoft Graph Python SDK" dependencies = [ @@ -14,7 +14,7 @@ dependencies = [ "microsoft-kiota-serialization-json >=1.0.0,<2.0.0", "microsoft-kiota-serialization-text >=1.0.0,<2.0.0", "microsoft-kiota-http >=1.0.0,<2.0.0", - "msgraph_core >=1.0.0a2" + "msgraph_core >=1.0.0" ] requires-python = ">=3.8" @@ -58,7 +58,7 @@ pythonpath = [ ] [tool.bumpver] -current_version = "1.0.0" +current_version = "1.1.0" version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]" commit_message = "bump version {old_version} -> {new_version}" commit = true From d7f0a6dc11f83da8156e90fcdfae12a96ee6ac12 Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Wed, 24 Jan 2024 13:34:51 +0300 Subject: [PATCH 4/7] Update build backend in project file --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9162a607c6a..920d145ed78 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["setuptools>=65.5.0", "wheel"] -build-backend = "setuptools.build_meta" +requires = ["flit_core >=3.2,<4"] +build-backend = "flit_core.buildapi" [project] name = "msgraph-sdk" From f4e515fabb1f71b7cf663dca0adcedbb236137a4 Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Wed, 24 Jan 2024 13:40:52 +0300 Subject: [PATCH 5/7] Revert to setuptools as publishing agent --- .github/workflows/publish.yml | 23 ++++++++++++----------- pyproject.toml | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 41c6960481d..9364c6f036e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,21 +17,22 @@ jobs: environment: pypi_prod needs: [build] steps: - - name: Checkout code - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.12 - - name: Install flit + python-version: '3.8' + - name: Install dependencies run: | - pip install flit - - name: Publish the distibution to PyPI - run: flit publish - env: - FLIT_INDEX_URL: https://upload.pypi.org/legacy/ - FLIT_USERNAME: __token__ - FLIT_PASSWORD: ${{ secrets. PYPI_API_TOKEN }} + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package + uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} release: name: Create release diff --git a/pyproject.toml b/pyproject.toml index 920d145ed78..4caeb6fa4a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["flit_core >=3.2,<4"] -build-backend = "flit_core.buildapi" +requires = ["setuptools>=65.5.0", "wheel"] +build-backend = "setuptools.build_meta" [project] name = "msgraph-sdk" @@ -58,7 +58,7 @@ pythonpath = [ ] [tool.bumpver] -current_version = "1.1.0" +current_version = "1..0" version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]" commit_message = "bump version {old_version} -> {new_version}" commit = true From 13afaa55bdc0beb99d340f0f8b5bf4b431098d9e Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Wed, 24 Jan 2024 13:43:59 +0300 Subject: [PATCH 6/7] Use python 3.12 --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e8348c8851d..e5187cd8b8b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.8' + python-version: '3.12' - name: Install dependencies run: | python -m pip install --upgrade pip From 960d749ec29e63ea691823540a495e0df7296b03 Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Wed, 24 Jan 2024 13:56:16 +0300 Subject: [PATCH 7/7] Add annotation --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e5187cd8b8b..29c34163311 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,7 +19,8 @@ jobs: environment: pypi_prod needs: [build] steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: